ODTUG Aggregator ODTUG Blogs http://localhost:8080 Fri, 23 Jun 2017 15:05:48 +0000 http://aggrssgator.com/ Announcing ORDS 3.0.10 and a new feature – Auto PLSQL http://www.thatjeffsmith.com/archive/2017/06/announcing-ords-3-0-10-and-a-new-feature-auto-plsql/ <p>New Oracle REST Data Services (ORDS) drop today.</p> <p>Per usual, mostly bug fixes</p> <p>And per usual, sometimes we like to sneak in new features as well, and this release is no different.</p> <p>You can now have ORDS automatically create POST handlers for executing your PL/SQL.</p> <p>This is a LOW CODE solution.</p> <p>You could of course ALWAYS roll your own RESTful Service to run your PLSQL, and in many cases, you&#8217;ll continue to want to do this.</p> <p>But today, you&#8217;ll ALSO be able to enable your PL/SQL programs, just like you&#8217;ve been able to do so for your TABLEs and VIEWs, a la</p> <div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="plsql"><pre class="de1"><span class="kw1">DECLARE</span> <span class="kw1">PRAGMA</span> AUTONOMOUS_TRANSACTION<span class="sy0">;</span> <span class="kw1">BEGIN</span> &nbsp; ORDS<span class="sy0">.</span>ENABLE_OBJECT<span class="br0">&#40;</span>p_enabled <span class="sy0">=&gt;</span> <span class="kw1">TRUE</span><span class="sy0">,</span> p_schema <span class="sy0">=&gt;</span> <span class="st0">'HR'</span><span class="sy0">,</span> p_object <span class="sy0">=&gt;</span> <span class="st0">'FOO_PLUS'</span><span class="sy0">,</span> p_object_type <span class="sy0">=&gt;</span> <span class="st0">'PROCEDURE'</span><span class="sy0">,</span> p_object_alias <span class="sy0">=&gt;</span> <span class="st0">'foo_plus'</span><span class="sy0">,</span> p_auto_rest_auth <span class="sy0">=&gt;</span> <span class="kw1">FALSE</span><span class="br0">&#41;</span><span class="sy0">;</span> &nbsp; <span class="kw1">COMMIT</span><span class="sy0">;</span> &nbsp; <span class="kw1">END</span><span class="sy0">;</span></pre></div></div></div></div></div></div></div> <p>What&#8217;s this mean, exactly?</p> <p>It&#8217;s basically a remote procedure call (RPC) scheme over HTTP(S) via ORDS. Where this gets INTERESTING is where ORDS has all of JSON to Oracle data types and back down to JSON for when you want to call the PL/SQL and then get the data (if there is any) back out.</p> <p>Let&#8217;s take a look.</p> <p>First let&#8217;s create a simple table.</p> <!-- Easy AdSense V7.43 --> <!-- [midtext: 1 urCount: 1 urMax: 0] --> <div class="ezAdsense adsense adsense-midtext" style="float:left;margin:12px;"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- 336-rectangle --> <ins class="adsbygoogle" style="display:inline-block;width:336px;height:280px" data-ad-client="ca-pub-1495560488595385" data-ad-slot="5904412551"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div> <!-- Easy AdSense V7.43 --> <div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="sql"><pre class="de1">&nbsp; <span class="kw1">CREATE</span> <span class="kw1">TABLE</span> <span class="st0">&quot;SIMPLE_EMP&quot;</span> <span class="br0">&#40;</span> <span class="st0">&quot;ID&quot;</span> <span class="kw1">NUMBER</span><span class="br0">&#40;</span><span class="sy0">*,</span><span class="nu0">0</span><span class="br0">&#41;</span> GENERATED ALWAYS <span class="kw1">AS</span> <span class="kw1">IDENTITY</span> MINVALUE <span class="nu0">1</span> MAXVALUE <span class="nu0">9999999999999999999999999999</span> <span class="kw1">INCREMENT</span> <span class="kw1">BY</span> <span class="nu0">1</span> <span class="kw1">START</span> <span class="kw1">WITH</span> <span class="nu0">1</span> CACHE <span class="nu0">20</span> <span class="kw1">ORDER</span> NOCYCLE <span class="kw1">NOT</span> <span class="kw1">NULL</span> ENABLE<span class="sy0">,</span> <span class="st0">&quot;NAME&quot;</span> VARCHAR2<span class="br0">&#40;</span><span class="nu0">256</span> BYTE<span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">NULL</span> ENABLE<span class="sy0">,</span> <span class="st0">&quot;SALARY&quot;</span> <span class="kw1">NUMBER</span><span class="br0">&#40;</span><span class="sy0">*,</span><span class="nu0">0</span><span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">NULL</span> ENABLE<span class="sy0">,</span> <span class="st0">&quot;HIRE_DATE&quot;</span> <span class="kw1">TIMESTAMP</span> <span class="br0">&#40;</span><span class="nu0">6</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="kw1">CONSTRAINT</span> <span class="st0">&quot;SIMPLE_EMP_PK&quot;</span> <span class="kw1">PRIMARY</span> <span class="kw1">KEY</span> <span class="br0">&#40;</span><span class="st0">&quot;ID&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; &nbsp; REM INSERTING <span class="kw1">INTO</span> SIMPLE_EMP <span class="kw1">SET</span> DEFINE OFF; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Mike'</span><span class="sy0">,</span><span class="nu0">188</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'21-JAN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Joel'</span><span class="sy0">,</span><span class="nu0">1</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'19-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Shaq'</span><span class="sy0">,</span><span class="nu0">1</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'19-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Bob'</span><span class="sy0">,</span><span class="nu0">1</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'19-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Bart'</span><span class="sy0">,</span><span class="nu0">0</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'20-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'David'</span><span class="sy0">,</span><span class="nu0">1</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'19-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Rene'</span><span class="sy0">,</span><span class="nu0">1</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'19-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Andres'</span><span class="sy0">,</span><span class="nu0">1</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'19-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Andre'</span><span class="sy0">,</span><span class="nu0">1</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'19-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; <span class="kw1">INSERT</span> <span class="kw1">INTO</span> SIMPLE_EMP <span class="br0">&#40;</span>NAME<span class="sy0">,</span>SALARY<span class="sy0">,</span>HIRE_DATE<span class="br0">&#41;</span> <span class="kw1">VALUES</span> <span class="br0">&#40;</span><span class="st0">'Bobby'</span><span class="sy0">,</span><span class="nu0">1</span><span class="sy0">,</span>to_timestamp<span class="br0">&#40;</span><span class="st0">'19-JUN-17 09.29.00.000000000 AM'</span><span class="sy0">,</span><span class="st0">'DD-MON-RR HH.MI.SSXFF AM'</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; COMMIT;</pre></div></div></div></div></div></div></div> <p>Here&#8217;s the code.</p> <div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="plsql"><pre class="de1"><span class="kw1">CREATE</span> <span class="kw1">OR</span> <span class="kw2">REPLACE</span> <span class="kw1">PROCEDURE</span> give_raises <span class="br0">&#40;</span> how_much <span class="kw1">IN</span> <span class="kw1">NUMBER</span> <span class="kw1">DEFAULT</span> <span class="nu0">0.50</span> <span class="sy0">,</span>total_payroll <span class="kw1">OUT</span> <span class="kw1">NUMBER</span> <span class="sy0">,</span>peeps_numbers <span class="kw1">OUT</span> SYS_REFCURSOR <span class="br0">&#41;</span> <span class="kw1">AS</span> <span class="kw1">BEGIN</span> <span class="kw1">UPDATE</span> simple_emp <span class="kw1">SET</span> salary <span class="sy0">=</span> salary <span class="sy0">*</span> how_much <span class="kw1">WHERE</span> <span class="kw2">UPPER</span><span class="br0">&#40;</span>name<span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">LIKE</span> <span class="st0">'%JEFF%'</span><span class="sy0">;</span> &nbsp; <span class="kw1">COMMIT</span><span class="sy0">;</span> <span class="kw1">SELECT</span> <span class="kw2">SUM</span><span class="br0">&#40;</span>salary<span class="br0">&#41;</span> <span class="kw1">INTO</span> total_payroll <span class="kw1">FROM</span> simple_emp<span class="sy0">;</span> &nbsp; <span class="kw1">OPEN</span> peeps_numbers <span class="kw1">FOR</span> <span class="kw1">SELECT</span> <span class="sy0">*</span> <span class="kw1">FROM</span> simple_emp <span class="kw1">ORDER</span> <span class="kw1">BY</span> HIRE_DATE <span class="kw1">DESC</span><span class="sy0">;</span> &nbsp; <span class="kw1">END</span> give_raises<span class="sy0">;</span></pre></div></div></div></div></div></div></div> <p>So let&#8217;s register the program with ORDS &#8211; I&#8217;ll use SQL Developer.<div id="attachment_6217" style="width: 421px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/autoplsql2.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/autoplsql2.png" alt="" width="411" height="616" class="size-full wp-image-6217" /></a><p class="wp-caption-text">This generates the PL/SQL block to register the program in the ORDS metadata schema &#8211; make sure to ALIAS and SECURE your code!</p></div> <p>Now let&#8217;s run it.</p> <p>To run a stored procedure via the Auto PL/SQL ORDS POST handler, you&#8217;ll need to send any input parameters via JSON in the request header. It&#8217;s a very simple format, just send up the input parameter names and values.</p> <p>Any output will come back.</p> <p>I&#8217;m expecting to send up a number, and get back another number and a list of my employees and how much money they&#8217;re making now via a REFCURSOR.<div id="attachment_6218" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/autoplsql1.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/autoplsql1.png" alt="" width="1024" height="597" class="size-full wp-image-6218" /></a><p class="wp-caption-text">Remember to set your mime type to application/json</p></div> <p>Now I&#8217;m returning a refcursor, and IN that refcursor is a TIMESTAMP. Working with dates and timestamps in Oracle and then down to JSON isn&#8217;t fun. But that&#8217;s OK, ORDS is handling all of that FOR YOU. Nice? NICE.</p> <p>Here&#8217;s the pretty JSON from my OUT parameters&#8230;.my output will be a bit longer than yours, I didn&#8217;t share all my records.</p> <div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="json"><pre class="de1">{ &quot;total_payroll&quot;: 631230, &quot;peeps_numbers&quot;: [ { &quot;id&quot;: 81, &quot;name&quot;: &quot;Dummy4&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 65, &quot;name&quot;: &quot;Bart&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 79, &quot;name&quot;: &quot;Dummy2&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 78, &quot;name&quot;: &quot;Dumm2&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 77, &quot;name&quot;: &quot;Dumm2&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 76, &quot;name&quot;: &quot;Dumm2y&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 75, &quot;name&quot;: &quot;Dummy&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 113, &quot;name&quot;: &quot;RUSTY5&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 112, &quot;name&quot;: &quot;RUSTY4&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 111, &quot;name&quot;: &quot;RUSTY3&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 110, &quot;name&quot;: &quot;RUSTY2&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 109, &quot;name&quot;: &quot;RUSTY&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 143, &quot;name&quot;: &quot;baby&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 82, &quot;name&quot;: &quot;Dummy5&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 80, &quot;name&quot;: &quot;Dummy3&quot;, &quot;salary&quot;: 0, &quot;hire_date&quot;: &quot;2017-06-20T13:29:00Z&quot; }, { &quot;id&quot;: 23, &quot;name&quot;: &quot;Barry&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 41, &quot;name&quot;: &quot;Joyce&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 62, &quot;name&quot;: &quot;Joel&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 63, &quot;name&quot;: &quot;Shakeebl&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 64, &quot;name&quot;: &quot;Shakeeb&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 145, &quot;name&quot;: &quot;WTFF&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 108, &quot;name&quot;: &quot;johnny&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 114, &quot;name&quot;: &quot;johnny&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 144, &quot;name&quot;: &quot;peter&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 116, &quot;name&quot;: &quot;daniel&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 117, &quot;name&quot;: &quot;wtf&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 118, &quot;name&quot;: &quot;wtff&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 119, &quot;name&quot;: &quot;wtfff&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 120, &quot;name&quot;: &quot;wtfffff&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 42, &quot;name&quot;: &quot;Dermot&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 24, &quot;name&quot;: &quot;John&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 146, &quot;name&quot;: &quot;WTFF&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 74, &quot;name&quot;: &quot;Bobby&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 73, &quot;name&quot;: &quot;Bob&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 72, &quot;name&quot;: &quot;Bob&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 71, &quot;name&quot;: &quot;Bob&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 70, &quot;name&quot;: &quot;Bob&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 69, &quot;name&quot;: &quot;Andres&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 68, &quot;name&quot;: &quot;Andres&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 67, &quot;name&quot;: &quot;Rene&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 66, &quot;name&quot;: &quot;David&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 122, &quot;name&quot;: &quot;wtfffffffff&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 141, &quot;name&quot;: &quot;wtfffffffffff&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 121, &quot;name&quot;: &quot;wtfffffff&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 142, &quot;name&quot;: &quot;wtffffffffffffff&quot;, &quot;salary&quot;: 1, &quot;hire_date&quot;: &quot;2017-06-19T13:29:00Z&quot; }, { &quot;id&quot;: 104, &quot;name&quot;: &quot;BrerRabbit&quot;, &quot;salary&quot;: 3, &quot;hire_date&quot;: &quot;2017-06-18T13:29:00Z&quot; }, { &quot;id&quot;: 103, &quot;name&quot;: &quot;BillyJimBob&quot;, &quot;salary&quot;: 3, &quot;hire_date&quot;: &quot;2017-06-18T13:29:00Z&quot; }, { &quot;id&quot;: 151, &quot;name&quot;: &quot;ThisIsATest&quot;, &quot;salary&quot;: 3, &quot;hire_date&quot;: &quot;2017-06-18T13:29:00Z&quot; }, { &quot;id&quot;: 101, &quot;name&quot;: &quot;BillyBob&quot;, &quot;salary&quot;: 3, &quot;hire_date&quot;: &quot;2017-06-18T13:29:00Z&quot; }, { &quot;id&quot;: 102, &quot;name&quot;: &quot;JimBob&quot;, &quot;salary&quot;: 3, &quot;hire_date&quot;: &quot;2017-06-18T13:29:00Z&quot; }, { &quot;id&quot;: 150, &quot;name&quot;: &quot;ThisIsATest&quot;, &quot;salary&quot;: 3, &quot;hire_date&quot;: &quot;2017-06-18T13:29:00Z&quot; }, { &quot;id&quot;: 147, &quot;name&quot;: &quot;ThisIsATest&quot;, &quot;salary&quot;: 3, &quot;hire_date&quot;: &quot;2017-06-18T13:29:00Z&quot; }, { &quot;id&quot;: 107, &quot;name&quot;: &quot;RESTY&quot;, &quot;salary&quot;: 6, &quot;hire_date&quot;: &quot;2017-06-15T13:29:00Z&quot; }, { &quot;id&quot;: 1, &quot;name&quot;: &quot;JEFF&quot;, &quot;salary&quot;: 10, &quot;hire_date&quot;: &quot;2017-06-10T13:29:00Z&quot; }, { &quot;id&quot;: 115, &quot;name&quot;: &quot;jeffrey&quot;, &quot;salary&quot;: 12, &quot;hire_date&quot;: &quot;2017-06-08T13:29:00Z&quot; }, { &quot;id&quot;: 164, &quot;name&quot;: &quot;Kristopher&quot;, &quot;salary&quot;: 31, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 162, &quot;name&quot;: &quot;Kristopher&quot;, &quot;salary&quot;: 31, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 152, &quot;name&quot;: &quot;JeffreyDSmith&quot;, &quot;salary&quot;: 25, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 153, &quot;name&quot;: &quot;JeffreyDSmith&quot;, &quot;salary&quot;: 25, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 154, &quot;name&quot;: &quot;JeffreyDSmith&quot;, &quot;salary&quot;: 25, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 161, &quot;name&quot;: &quot;Kristopher&quot;, &quot;salary&quot;: 31, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 156, &quot;name&quot;: &quot;Kristopher&quot;, &quot;salary&quot;: 31, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 157, &quot;name&quot;: &quot;Kristopher&quot;, &quot;salary&quot;: 31, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 158, &quot;name&quot;: &quot;Kristopher&quot;, &quot;salary&quot;: 31, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 159, &quot;name&quot;: &quot;Kristopher&quot;, &quot;salary&quot;: 31, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 160, &quot;name&quot;: &quot;Kristopher&quot;, &quot;salary&quot;: 31, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 155, &quot;name&quot;: &quot;JeffreyDSmith&quot;, &quot;salary&quot;: 25, &quot;hire_date&quot;: &quot;2017-05-26T13:29:00Z&quot; }, { &quot;id&quot;: 169, &quot;name&quot;: &quot;Topher2&quot;, &quot;salary&quot;: 38, &quot;hire_date&quot;: &quot;2017-05-21T13:29:00Z&quot; }, { &quot;id&quot;: 170, &quot;name&quot;: &quot;Topher3&quot;, &quot;salary&quot;: 38, &quot;hire_date&quot;: &quot;2017-05-21T13:29:00Z&quot; }, { &quot;id&quot;: 167, &quot;name&quot;: &quot;Topher&quot;, &quot;salary&quot;: 38, &quot;hire_date&quot;: &quot;2017-05-21T13:29:00Z&quot; }, { &quot;id&quot;: 21, &quot;name&quot;: &quot;Kris&quot;, &quot;salary&quot;: 63, &quot;hire_date&quot;: &quot;2017-05-01T13:29:00Z&quot; }, { &quot;id&quot;: 106, &quot;name&quot;: &quot;RESTPM&quot;, &quot;salary&quot;: 63, &quot;hire_date&quot;: &quot;2017-05-01T13:29:00Z&quot; }, { &quot;id&quot;: 61, &quot;name&quot;: &quot;Mike&quot;, &quot;salary&quot;: 188, &quot;hire_date&quot;: &quot;2017-01-21T14:29:00Z&quot; }, { &quot;id&quot;: 83, &quot;name&quot;: &quot;Ric&quot;, &quot;salary&quot;: 625, &quot;hire_date&quot;: &quot;2016-02-06T14:29:00Z&quot; }, { &quot;id&quot;: 201, &quot;name&quot;: &quot;Topher3&quot;, &quot;salary&quot;: 750, &quot;hire_date&quot;: &quot;2015-10-29T13:29:00Z&quot; }, { &quot;id&quot;: 221, &quot;name&quot;: &quot;Topher&quot;, &quot;salary&quot;: 750, &quot;hire_date&quot;: &quot;2015-10-29T13:29:00Z&quot; }, { &quot;id&quot;: 241, &quot;name&quot;: &quot;Topher3&quot;, &quot;salary&quot;: 750, &quot;hire_date&quot;: &quot;2015-10-29T13:29:00Z&quot; }, { &quot;id&quot;: 181, &quot;name&quot;: &quot;Jeffrey Dan&quot;, &quot;salary&quot;: 2500, &quot;hire_date&quot;: &quot;2010-08-16T13:29:00Z&quot; }, { &quot;id&quot;: 105, &quot;name&quot;: &quot;RESTPM&quot;, &quot;salary&quot;: 625000, &quot;hire_date&quot;: &quot;0648-07-04T14:29:00Z&quot; } ] }</pre></div></div></div></div></div></div></div> <div id="attachment_6219" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/genie.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/genie.png" alt="" width="1024" height="616" class="size-full wp-image-6219" /></a><p class="wp-caption-text">Actually, there&#8217;s only really one &#8216;gotcha.&#8217;</p></div> <p>We don&#8217;t support overloaded PL/SQL package functions or procedures. You can still use those, but you&#8217;ll need to roll your own RESTful Services if you want to call them. If you try them with the Auto PLSQL feature, you&#8217;ll get a 404.</p> thatjeffsmith http://www.thatjeffsmith.com/?p=6216 Tue Jun 20 2017 15:47:58 GMT-0400 (EDT) ODTUG Kscope17 Livestream Sessions http://www.odtug.com/p/bl/et/blogaid=735&source=1 If you can't make it to ODTUG Kscope17, you can still participate from home. Check out the list of sessions we're bringing you live from San Antonio, Texas! ODTUG http://www.odtug.com/p/bl/et/blogaid=735&source=1 Tue Jun 20 2017 14:44:07 GMT-0400 (EDT) ODTUG Kscope17 Livestream Sessions http://www.odtug.com/p/bl/et/blogaid=730&source=1 If you can't make it to ODTUG Kscope17, you can still participate from home. Check out the list of sessions we're bringing you live from San Antonio, Texas! ODTUG http://www.odtug.com/p/bl/et/blogaid=730&source=1 Tue Jun 20 2017 10:02:17 GMT-0400 (EDT) Learning New Things : Finding Information http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/VlNtQ0Z-I5k/ <p><img class="alignleft wp-image-7081" src="https://oracle-base.com/blog/wp-content/uploads/2017/04/owl-book-47526_640.png" alt="" width="150" height="141" />In an age where almost all information is a Google search away, why do people find it so difficult to get answers?</p> <h2>Let Me Google That For You!</h2> <p>This is going to sound silly, but I&#8217;m convinced most of the people who seem to have trouble don&#8217;t actually Google the question in the first place. Countless times I&#8217;ve answered a question by putting the subject of the email or forum post into Google and searching. Typically the answer is in the top 3 links.</p> <p>This could mean one of several things:</p> <ul> <li>They haven&#8217;t Googled it.</li> <li>They have Googled, but don&#8217;t trust the answer.</li> <li>They are working asynchronously. Machine gun out the questions, and work on something else while they wait for someone to come back with the answer.</li> </ul> <p>Let&#8217;s look at these individually.</p> <h2>They haven&#8217;t Googled it.</h2> <p>If they fall into the category, they really need to leave IT and do something different. Seriously. If you&#8217;ve not figured out Googling for answers after the first day on the job, you are in the wrong job. You can&#8217;t be helped!</p> <h2>They have Googled, but don&#8217;t trust the answer.</h2> <p>This second option is more interesting, because the signal-to-noise ratio of the internet is a problem. Fortunately the answer to this is equally simple too. When you search for something and find what appears to be an answer, if that answer doesn&#8217;t come with a working example you can try yourself, you should probably question the value of it. At the very least you need to figure out your own test case to prove it. Either that or check out the next link on Google to see if that has a working example.</p> <p>I appreciate not all problems can be replicated in a little copy/paste example on a laptop, but a great deal of them can. I was lucky that early on in my career I was influenced by Tom Kyte who always tried to give small test cases to prove a point. It&#8217;s a really good habit to get into. So many times I&#8217;ve &#8220;known something to be true&#8221;, then been unable to demonstrate it, then finally proved the opposite to be the case. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Your understanding changes over time. The database changes over time. What was true then may not be now.</p> <p>Over time you will start to recognise names of content producers, and you will start to identify trusted sources of information, and perhaps more importantly, those whose content you should avoid.</p> <p>Remember, even when you have built up a list of trusted sources, you should still constantly test what they say. Everyone can make mistakes.</p> <h2>They are working asynchronously</h2> <p>I suppose you could say they are trying to be efficient, but I think ultimately this approach will fail. You are not learning how to learn. You are still reliant on other people giving you the answers. This is not personal development. What&#8217;s more, you still need to test things or you are at the mercy of what some random person told you in a forum. Think about what I said in the previous section.</p> <p>Your ultimate aim should be to become as self sufficient as possible. I&#8217;m not suggesting you will do everything yourself, but you should be able to find information, evaluate its worth and use it, without having to post help messages on forums every 30 seconds. If you are taking personal development seriously, asking others for help should become the exception, not the rule.</p> <h2>Where should you be looking?</h2> <p>As I said in <a href="/blog/2016/04/21/learning-to-answer-questions-for-yourself/">Learning to answer questions for yourself!</a></p> <ol> <li>Google. A lot of the time, the first couple of links will give me the answer. Sometimes it’s one of my articles that gives me the answer I&#8217;m looking for. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li> <li>Search the Oracle documentation for the topic and/or quickly scan through the table of contents in the relevant manuals.</li> <li>Search My Oracle Support.</li> <li>If at this point you&#8217;ve not got the answer, you might be asking the wrong question. Try to refine your search criteria.</li> </ol> <p>I&#8217;ve mentioned many of the points raised in this post over the years. You can see other posts on this type of thing here.</p> <ul> <li><a href="/blog/2016/07/27/learning-career-development-and-mentoring/">Learning, Career Development and Mentoring</a></li> <li><a href="/blog/2016/04/21/learning-to-answer-questions-for-yourself/">Learning to answer questions for yourself!</a></li> <li><a href="/blog/2014/09/14/learning-for-yourself/">Learning for yourself!</a></li> <li><a href="/blog/2012/11/06/learning-to-learn/">Learning to learn…</a></li> <li><a href="/blog/2010/08/09/learn-to-search-the-oracle-docs/">Learn to search the Oracle Docs…</a></li> <li><a href="/blog/2014/06/06/what-happens-if-you-try-it/">What happens if I try?</a></li> <li><a href="/articles/misc/learning-to-be-an-oracle-database-administrator-dba">Learning to be an Oracle Database Administrator (DBA)</a></li> </ul> <p>Check out the rest of this series <a href="https://oracle-base.com/blog/2017/06/19/learning-new-things-a-series-of-posts/">here</a>.</p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/20/learning-new-things-finding-information/">Learning New Things : Finding Information</a> was first posted on June 20, 2017 at 8:55 am.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/VlNtQ0Z-I5k" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7193 Tue Jun 20 2017 03:55:33 GMT-0400 (EDT) Optimizer- Oracle and SQL Server, Hints http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/ <div id="tweetbutton6841" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fdbakevlar.com%2F2017%2F06%2Foptimizer-oracle-sql-server-hints%2F&amp;text=RT%20%40DBAKevlar%20%40DBAKevlar%20%3A&amp;related=DBAKevlar:DBA+Kevlar&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdbakevlar.com%2F2017%2F06%2Foptimizer-oracle-sql-server-hints%2F" class="twitter-share-button" style="width:55px;height:22px;background:transparent url('http://dbakevlar.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat 0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><div class="pf-content"> <!-- Easy Plugin for AdSense V8.67 --> <!-- [leadin: 2 urCount: 2 urMax: 0] --> <div class="ezAdsense adsense adsense-leadin" style="float:right;margin:12px;"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- kevlar_ad --> <ins class="adsbygoogle" style="display:inline-block;width:320px;height:100px" data-ad-client="ca-pub-5103295461547706" data-ad-slot="5182487270"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div> <!-- Easy Plugin for AdSense V8.67 --> <p>So you&#8217;re going to see a lot of posts from me in the coming months surrounding topics shared by Oracle and SQL Server.  These posts offer me the opportunity to re-engage with my Oracle roots and will focus on enhancing my SQL Server knowledge for the 2014 and 2016, (2017 soon enough, too) features, which I&#8217;m behind in.</p> <p><a href="http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/swing-jump-fail/" rel="attachment wp-att-6843"><img class="alignnone size-full wp-image-6843" src="https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/06/Swing-Jump-Fail.gif?resize=478%2C346" alt="" data-recalc-dims="1" /></a></p> <p>I&#8217;m going to jump right in with both feet with the topics of <strong>hints</strong>.  The official, (and generic) definition of a SQL hint is:</p> <p><em>&#8220;A<b> hint</b> is an addition to a SQL statement that instructs the database engine on how to execute the statement.&#8221;</em></p> <p>Hints are most often used in discussion on queries, but they can assist in influencing the performance of inserts, updates and deletes, too.  What you&#8217;ll find is that the actual terminology is pretty much the same for hints in SQL statements for Oracle and SQL Server, but the syntax is different.</p> <h3>The Optimizer and Oracle</h3> <p>Oracle hints were quite common during the infancy of the Oracle Cost Based Optimizer, (CBO).  It could be frustrating for a database administrator who was accustomed to the Rules Based Optimizer, (rules, people!  If there&#8217;s an index, use it!) to give up control of performance to a feature that simply wasn&#8217;t taking the shortest route to the results.  As time passed from Oracle 9i to 10g, we harnessed hints less, trusting the CBO and by Oracle 11g, it started to be frowned upon unless you had a very strong use case for hinting.  I was in the latter scenario, as my first Oracle 11g database environment required not just new data, but a new database weekly and a requirement for me to guarantee performance.  I knew pretty much every optimal plan for every SQL statement in the systems and it was my responsibility to make sure each new database chose the most optimal plan.  I had incorporated complex hints, (and then profiles as we upgraded&#8230;)</p> <p>With the introduction of database version Oracle 12c, it became a sought after skill to use hints effectively again, as many new optimizer features, (often with the words &#8220;dynamic&#8221; or &#8220;automated&#8221; in them) started to impact performance beyond what was outside the allowable.</p> <h3>SQL Server&#8217;s Query Optimizer</h3> <p>SQL Server&#8217;s optimizer took a big jump in features and functionality in SQL Server 2014.  With this jump, we started to see a new era of SQL Server performance experts with the introduction of SQL Server 2016 that moved even further into expertise with optimization, not only in collecting performance data via dynamic management views/functions, (DMVs/DMFs) but also in ability to influence the SQL Server Query Optimizer to make intelligent decisions with advanced statistics features and elevated hinting.</p> <p>Hints have a more convoluted history in the SQL Server world than in the Oracle one.  I have to send some love and attention to <strong><a href="https://twitter.com/Kendra_Little">Kendra Little</a></strong> after I <a href="https://littlekendra.com/2016/02/04/why-rowlock-hints-can-make-queries-slower-and-blocking-worse-in-sql-server/">found this cartoon</a> she drew in regards to her frustration with the use of ROWLOCK hints:</p> <p><a href="http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/with-rowlick/" rel="attachment wp-att-6844"><img class="alignnone wp-image-6844" src="https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/06/with-rowlick.png?resize=411%2C137" alt="" srcset="https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/06/with-rowlick.png?w=600 600w, https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/06/with-rowlick.png?resize=300%2C100 300w" sizes="(max-width: 411px) 100vw, 411px" data-recalc-dims="1" /></a></p> <p>After reading this, my plan is still to go deeper into a number of areas of performance, including the optimizers, but today, we&#8217;ll just stick to a high level difference on hinting in queries.</p> <h3>Hints</h3> <p>In our examples, we&#8217;ll focus on forcing the use of a HASH join instead of a nested loop, using an index for a specific table and a MERGE join.  Let&#8217;s say we want to use a hash join on the <strong>Employees</strong> and a merge join on the<strong> Job_history</strong> table.  We also want to make sure that we use the primary key for one of the <strong>employee ID</strong> joins, as a less optimal index usage results with lower costs even though the performance isn&#8217;t as optimal due to concurrency.</p> <p>The query would look like the following in <strong>Oracle</strong>:</p> <pre dir="ltr">SELECT <strong>/*+ LEADING(e2 e1) USE_HASH(e1) INDEX(e1 emp_emp_id_pk) USE_MERGE(j) FULL(j) */</strong> e1.Name, j.job_id, sum(e2.salary) total_sal FROM employees e1, employees e2, job_history j WHERE e1.employee_id = e2.manager_id AND e1.employee_id = j.employee_id AND e1.hire_date = j.start_date GROUP BY e1.first_name, e1.last_name, j.job_id ORDER BY total_sal;</pre> <p>If there was a subquery as part of this statement, we could add a second set of hints for it, as each query supports its own hints in the statement after the word <strong>SELECT</strong>.</p> <p>If we were to take the same statement in <strong>SQL Server</strong>, the hints would look a bit different.  Yeah, the following is about as close as I could get to &#8220;apples to apples&#8221; in hints and in TSQL, so please forgive me if it ain&#8217;t as pretty as I would have preferred it to be:</p> <pre>SELECT e1.Name, j.Jobid, sum(pr.Salary) Total_Salary FROM Employees AS e1, <strong>INNER MERGE JOIN</strong> Job_History AS j <strong>LEFT OUTER HASH JOIN</strong> Employees AS e2 <strong><span class="hljs-keyword"> WITH</span> (FORCESEEK (</strong><strong>emp_emp_id_pk</strong><strong>(e2.EmployeeID))) </strong>ON e1.EmployeeID = e2.ManagerID WHERE e1.EmployeeID = j.EmployeeID AND e1.HireDate = j.StartDate GROUP BY e1.Name, j.JobID ORDER BY Total_Salary;</pre> <p>In a TSQL statement, each hint is placed at the object in the statement that its in reference to.  The hints are written out commands, (vs. more hint syntax required in Oracle) and the force seek on the primary key for<strong> Employees</strong>.</p> <p>As you can see, Oracle signals a hint when put between<strong> /*</strong>+ and ending with a <strong>*/</strong>.  Each requires some syntax and advanced performance knowledge, but all in all, the goal is the same-  influence the optimizer to perform in a specific way and [hopefully] choose the optimal plan.</p> <p>Please let me know if you&#8217;d like to see more in this series, either by sending me an email to dbakevlar at Gmail or commenting on this post and I&#8217;m going to go start preparing for <strong><a href="http://kscope17.com/">KSCOPE 2017</a></strong>&#8211;  Someone explain to me how it already is the end of June!! <img src="https://s.w.org/images/core/emoji/2.2.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p><a href="http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/screen-shot-2017-06-19-at-7-33-33-pm/" rel="attachment wp-att-6845"><img class="size-full wp-image-6845 aligncenter" src="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/06/Screen-Shot-2017-06-19-at-7.33.33-PM.png?resize=600%2C232" alt="" srcset="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/06/Screen-Shot-2017-06-19-at-7.33.33-PM.png?w=682 682w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/06/Screen-Shot-2017-06-19-at-7.33.33-PM.png?resize=300%2C116 300w" sizes="(max-width: 600px) 100vw, 600px" data-recalc-dims="1" /></a></p> <p>&nbsp;</p> <p>&nbsp;</p> </div><br><br><img src="https://i2.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/ico-tag.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> Tags:&nbsp;&nbsp;<a href="http://dbakevlar.com/tag/oracle-hints/" rel="tag">Oracle hints</a>, <a href="http://dbakevlar.com/tag/sql-server-hints/" rel="tag">SQL Server hints</a><br><br><div style="width:100%"><table align="left" width="100%" cellspacing="0" cellpadding="0" bgcolor="#f1f1f1" border="0px;"> <tbody> <tr bgcolor="#ffffff"><td align="center" width="17%" valign="top"> <span class="sb_title">Del.icio.us</span><br> <a href="http://del.icio.us/post?url=http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/&title=Optimizer- Oracle and SQL Server, Hints"> <img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/delicious.gif?w=600" border="0" align="absmiddle" data-recalc-dims="1"> </a> </td><td align="center" width="17%" valign="top"> &span class="sb_title">Facebook</span><br> <a href="http://www.facebook.com/share.php?u=http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/"><img src="https://i0.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/facebook_icon.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">TweetThis</span><br> <a href="http://twitthis.com/twit?url=http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/&title=Optimizer- Oracle and SQL Server, Hints"><img src="https://i2.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tweet.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">Digg</span><br> <a href="http://digg.com/submit?phase=2&url=http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/&title=Optimizer- Oracle and SQL Server, Hints"><img src="https://i0.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/digg.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">StumbleUpon</span><br> <a href="http://www.stumbleupon.com/submit?url=http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/&title=Optimizer- Oracle and SQL Server, Hints"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/stumble.gif?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td></tr> </tbody></table></div><br><div style="clear:both"></div><div style="background:#EEEEEE; padding:0px 0px 0px 15px; margin:10px 0px 0px 0px;"><div style="padding:5px 0px 5px 0px;"><b>Comments:</b>&nbsp;&nbsp;<a href="http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/#comments">1 (One) on this item</a></div><br><div style="clear:both"></div><div style="padding:13px 0px 5px 0px;"><span style="border-bottom:1px dashed #003399;padding-bottom:4px;"><strong>You might be interested in this:</strong></span>&nbsp;&nbsp;<br><ul style="margin:0; padding:0; padding-top:10px; padding-bottom:5px;"><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2016/03/best-practices-with-enterprise-manager-13c/" >Best Practices with Enterprise Manager 13c</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2014/06/the-new-and-improved-extensibility-exchange-is-here/" >The *New and Improved* Extensibility Exchange is Here!</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2010/09/building-right-or-build-twice-that-is-the-question/" >Building Right or Build Twice- That is the Question...</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2015/08/scripts-from-todays-family-coding-and-hands-on-lab-fix/" >Scripts from Today's Family Coding and Hands on Lab Fix</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2010/05/oem-oc4j-false-downtimeouts/" >OEM OC4J False Down/Timeouts</a></li></ul></div></div><hr style="color:#EBEBEB" /><small>Copyright © <a href="http://dbakevlar.com">DBA Kevlar</a> [<a href="http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/">Optimizer- Oracle and SQL Server, Hints</a>], All Right Reserved. 2017.</small><br><p>The post <a rel="nofollow" href="http://dbakevlar.com/2017/06/optimizer-oracle-sql-server-hints/">Optimizer- Oracle and SQL Server, Hints</a> appeared first on <a rel="nofollow" href="http://dbakevlar.com">DBA Kevlar</a>.</p> dbakevlar http://dbakevlar.com/?p=6841 Mon Jun 19 2017 21:35:48 GMT-0400 (EDT) JDev/ADF sample - Fixes for ADF Cloud User Experience Rapid Development Kit (RDK) UI Layout Issues http://andrejusb-samples.blogspot.com/2017/06/jdevadf-sample-fixes-for-adf-cloud-user.html <div dir="ltr" style="text-align: left;" trbidi="on"><ul><li><a href="http://andrejusb.blogspot.co.za/2017/06/fixes-for-adf-cloud-user-experience.html" target="_blank">Fixes for ADF Cloud User Experience Rapid Development Kit (RDK) UI Layout Issues</a>. If you was evaluating Oracle RDK UI template, probably you noticed information popup coming up, when RDK home page is loaded. Popup is loaded through showPopupBehavior listener, which is executed on Welcome page load event. Such popup is not required in practice, and usually is disabled. But as soon as you disable it, there will be layout issues with Welcome page. User information widget will not align the name and menu navigation items will not be ordered correctly.</li></ul><ol>Download - <a href="https://docs.google.com/uc?export=download&amp;id=0Bw_kr1_tXc-eanhhelhVbFpvbTA">AppsCloudUIKit_v3.zip</a></ol></div> Andrejus Baranovskis tag:blogger.com,1999:blog-4301764760924839143.post-7003003177663512487 Mon Jun 19 2017 15:12:00 GMT-0400 (EDT) Learning New Things : A Series of Posts http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/xQtif9WRcB0/ <p><img class="alignleft wp-image-7081" src="https://oracle-base.com/blog/wp-content/uploads/2017/04/owl-book-47526_640.png" alt="" width="150" height="141" />I&#8217;m going to start a short series of posts about the process of learning new things. Many of the points have been discussed in this blog over the years, but I thought it would be nice to bring them together. I&#8217;m an IT guy, so there is an IT spin on it, but most of the stuff is more general in nature.</p> <p>Here is the list of posts I&#8217;ve written so far. I will switch them to links as I publish the posts.</p> <ul> <li><a href="https://oracle-base.com/blog/2017/06/20/learning-new-things-finding-information/">Finding Information</a></li> <li>We don&#8217;t need no freakin&#8217; test case!</li> <li>Time and Repetition</li> <li>Pick the Right Think to Learn</li> <li>My Process</li> <li>Learning Gets Easier</li> </ul> <p>This series is about my experience of learning, rather than something more formal. I&#8217;m no expert! Feel free to disagree with me. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/19/learning-new-things-a-series-of-posts/">Learning New Things : A Series of Posts</a> was first posted on June 19, 2017 at 8:05 pm.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/xQtif9WRcB0" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7214 Mon Jun 19 2017 15:05:09 GMT-0400 (EDT) All You Need to Know About ODTUG Kscope17 Beacon Technology http://www.odtug.com/p/bl/et/blogaid=728&source=1 At ODTUG Kscope17, we are using wearable beacon technology to make the event better, and understand what works and what does not. ODTUG http://www.odtug.com/p/bl/et/blogaid=728&source=1 Mon Jun 19 2017 14:18:22 GMT-0400 (EDT) lock sys http://laurentschneider.com/wordpress/2017/06/lock-sys.html <p>In the old days, locking sys had not much effect.<br /> <pre><code> SQL&gt; alter user sys identified by *** account lock; User altered. SQL&gt; select account_status &nbsp;&nbsp;from dba_users &nbsp;&nbsp;where username=&#039;SYS&#039;; ACCOUNT_STATUS -------------------------------- LOCKED SQL&gt; conn / as sysdba Connected. SQL&gt; conn sys/** as sysdba Connected. SQL&gt; conn sys/***@db01 as sysdba Connected. </code></pre></p> <p>Well, in the very-old days, Oracle7, or with the in 12cR2-deprecated parameter O7_DICTIONARY_ACCESSIBILITY, SYS could be locked. But this is out of the scope of this post.</p> <p>In 12cR2, it is now possible to lock SYS.<br /> <pre><code> SQL&gt; alter user sys &nbsp;&nbsp;identified by *** &nbsp;&nbsp;account lock; User altered. SQL&gt; select account_status &nbsp;&nbsp;from dba_users &nbsp;&nbsp;where username=&#039;SYS&#039;; ACCOUNT_STATUS -------------------------------- LOCKED SQL&gt; conn / as sysdba Connected. SQL&gt; conn sys/** as sysdba Connected. SQL&gt; conn sys/***@db01 as sysdba ERROR: ORA-28000: the account is locked </code></pre></p> <p>I like it <img src="https://s.w.org/images/core/emoji/2.2.1/72x72/1f642.png" alt="&#x1f642;" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Oracle recommends you create other users to perform DBA tasks.<br /> <pre><code> SQL&gt; grant dba, sysdba &nbsp;&nbsp;to user0001 &nbsp;&nbsp;identified by ***; Grant succeeded. </code></pre></p> <p>Still, probably intentionally left so or simply forgotten, Oracle recommends to lock <i>all Oracle supplied accounts except for SYS and SYSTEM</i> (ref: <a href="http://docs.oracle.com/database/122/UPGRD/tasks-complete-only-manually-upgrading-oracle-database.htm#UPGRD52690">Changing Passwords for Oracle Supplied Accounts</a>)</p> <p>Also note, you&#8217;ll get an ORA-40365 if you use an old-style password file</p> <p><pre><code> SQL&gt; alter user sys identified by *** account lock; alter user sys identified by *** account lock * ERROR at line 1: ORA-40365: The SYS user cannot be locked &nbsp;&nbsp;while the password file is in its current format. </code></pre></p> Laurent Schneider http://laurentschneider.com/?p=2474 Mon Jun 19 2017 09:55:58 GMT-0400 (EDT) Configuring Jetty in Standalone ORDS http://www.thatjeffsmith.com/archive/2017/06/configuring-jetty-in-standalone-ords/ <p>For all of my ORDS demos, I&#8217;m running it as a standalone process. There&#8217;s no Tomcat or Apache involved &#8211; and that&#8217;s OK. Your needs may require otherwise, and that&#8217;s OK too.<div id="attachment_6215" style="width: 858px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords-diagram.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords-diagram.png" alt="" width="848" height="357" class="size-full wp-image-6215" /></a><p class="wp-caption-text">ORDS has a VERY flexible implementation model. We DO support standalone installs FWIW.</p></div> <p>When running in a standalone configuration like this, ORDS&#8217; HTTP(S) functionality is being delivered by an embedded Jetty web server. <a href="http://www.eclipse.org/jetty/" target="_blank">Jetty is an Eclipse project</a>. Very cool stuff &#8211; used by LOTS of solutions out there. </p> <p>Anyhow, a customer asked:</p> <blockquote><p> Hi,</p> <p>Can we hide Jetty version in the header response ?<br /> which is :</p> <p>Server : Jetty(9.2.z-SNAPSHOT) </p></blockquote> <p>Or in other words, they&#8217;re not a big fan of THIS<div id="attachment_6213" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/jetty1.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/jetty1.png" alt="" width="1024" height="442" class="size-full wp-image-6213" /></a><p class="wp-caption-text">What&#8217;s the big deal?</p></div> <p>Security by obscurity &#8211; maybe you don&#8217;t want to advertise that you&#8217;re running Jetty.</p> <p>Ok, so how do we make that go away?</p> <p>Thankfully it&#8217;s pretty easy.</p> <h3>The ETC\JETTY XML Config File</h3> <p>In your <em>ORDS-INSTALL-HOME</em>\standalone directory, create a subdirectory &#8216;etc&#8217;</p> <p>Then in THAT directory, create an jetty-http.xml file. </p> <p>Then in THAT file, add these lines</p> <div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span><span class="re2">?&gt;</span></span> <span class="sc0">&lt;!DOCTYPE Configure PUBLIC &quot;-//Jetty//Configure//EN&quot; &quot;http://www.eclipse.org/jetty/configure.dtd&quot;&gt;</span> <span class="sc3"><span class="re1">&lt;Configure</span> <span class="re0">id</span>=<span class="st0">&quot;httpConfig&quot;</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.jetty.server.HttpConfiguration&quot;</span><span class="re2">&gt;</span></span> <span class="sc3"><span class="re1">&lt;Set</span> <span class="re0">name</span>=<span class="st0">&quot;sendServerVersion&quot;</span><span class="re2">&gt;</span></span>false<span class="sc3"><span class="re1">&lt;/Set<span class="re2">&gt;</span></span></span> <span class="sc3"><span class="re1">&lt;/Configure<span class="re2">&gt;</span></span></span></pre></div></div></div></div></div></div></div> <p>Restart ORDS.</p> <p>Refresh your ORDS request, check the response header.<div id="attachment_6214" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/jetty2.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/jetty2.png" alt="" width="1024" height="441" class="size-full wp-image-6214" /></a><p class="wp-caption-text">Nothing to see here&#8230;</p></div> <p>Cool? Cool.</p> <h3>There&#8217;s a TON of Jetty Config Options Available</h3> <p>Kris has talked about a few of them before. For example, <a href="http://krisrice.blogspot.com/2017/01/how-to-add-ncsa-style-access-log-to.html" target="_blank">this post on how to enable Access logs for Jetty</a> pretty much told me HOW to do this post today. </p> <p>Ok, so what else can I change?</p> <p>You&#8217;ll want to take a look at the <a href="http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/HttpConfiguration.html" target="_blank">Jetty API docs</a>. Here&#8217;s the interesting bits on <a href="http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/HttpConfiguration.html" target="_blank">controlling the response header</a>.</p> <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --> thatjeffsmith http://www.thatjeffsmith.com/?p=6212 Mon Jun 19 2017 09:32:27 GMT-0400 (EDT) Steps for Moving ASM Disk from FRA to DATA http://www.fahdmirza.com/2017/06/steps-for-moving-asm-disk-from-fra-to.html <div dir="ltr" style="text-align: left;" trbidi="on">Due to some unexpected data load, the space in DATA diskgroup became critically low on one of the production systems during middle of night on the weekend. There was no time to get a new disk and we needed the space to make room for new data load scheduled to be run after 3 hours.<div><br /></div><div>Looked at the tablespaces space in DATA diskgroup and there wasn't much hope in terms of moving or shrinking or deleting anything. Also the upcoming data load was direct path load which always writes above the high water mark in segments, so shrinking wasn't of much help.</div><div><br /></div><div>Looked at the FRA diskgroup and found out that there was plenty of space there, so I decided to rob Peter to pay Paul. The plan was to remove a disk from FRA diskgroup and add it to DATA. This all was done online and these were general steps:</div><div><br /></div><div><b>Steps for Moving ASM Disk from FRA to DATA :</b></div><div><br /></div><div>1) Remove Disk from FRA diskgroup</div><div><br /></div><div><div>SQL&gt; alter diskgroup FRA drop disk FRA_06;</div><div><br /></div><div>Diskgroup altered.</div><div><br /></div><div>2) Wait for Rebalance to finish</div><div><br /></div><div>SQL&gt; SELECT group_number, operation, state, power, est_minutes FROM v$asm_operation;</div></div><div><br /></div><div>3) Add disk to the DATA diskgroup</div><div><br /></div><div>alter diskgroup DATA add disk '/dev/myasm/superdb_fra_06' name DATA_06 rebalance power 8;</div><div><br /></div><div><div><div>4) Wait for Rebalance to finish</div><div><br /></div><div>SQL&gt; SELECT group_number, operation, state, power, est_minutes FROM v$asm_operation;</div></div></div><div><br /></div><div>This provided a much needed breather for the weekend and data load ran successfully. We will be making sure that we provision more disks to the DATA diskgroup and return the FRA disk to FRA with thanks.</div><div><br /></div><div><br /></div></div> Fahd Mirza tag:blogger.com,1999:blog-3496259157130184660.post-6207866562955401739 Sun Jun 18 2017 22:11:00 GMT-0400 (EDT) Five (5) People to Follow On Twitter http://www.thatjeffsmith.com/archive/2017/06/five-5-people-to-follow-on-twitter/ <p>I wrote this on LinkedIn, but that platform doesn&#8217;t play nice with Flipboard, and not all of you are <a href="https://www.linkedin.com/in/thatjeffsmith/" target="_blank">connected with me</a> there.<br /> <div id="attachment_6211" style="width: 760px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/linkedin-blog-header.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/linkedin-blog-header.png" alt="" width="750" height="320" class="size-full wp-image-6211" /></a><p class="wp-caption-text">Don&#8217;t judge them harshly for their association with me &#8211; they&#8217;re too polite to ignore me.</p></div> <p>So, if you Twitter, take a second and <a href="https://www.linkedin.com/pulse/five-oracle-pros-follow-twitter-jeff-smith" target="_blank">follow these people</a>. You can thank me later.</p> <p>If you&#8217;re looking to follow even MORE people, go read that story, and you&#8217;ll see how to fine 194 more.</p> <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --> thatjeffsmith http://www.thatjeffsmith.com/?p=6210 Sat Jun 17 2017 16:25:00 GMT-0400 (EDT) OGh Tech Experience 2017 : The Journey Home http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/hE29ccFDvw0/ <p><a href="https://www.ogh.nl/"><img class="alignleft size-full wp-image-6065" src="https://oracle-base.com/blog/wp-content/uploads/2016/05/ogh.jpg" alt="" width="160" height="81" /></a>I woke up really early so I decided to head straight for the airport. It was a 20 minute bus ride to the station, then a train to the airport, or so I thought. It turned out there wasn&#8217;t a straight through train, so I had to go via Utrecht. Once at Utrecht I got on a train the the airport, but it stopped early due to work on the lines, so I had to change to a third train for the last bit of the journey. I was now really glad I had set off early. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Even with the unplanned changes to the journey, I still arrived a couple of hours early for my flight. The airport bag-check area was chaos. I had done an online check-in, and I didn&#8217;t need to check bags, but it took quite a bit of time to negotiate the hordes. Once past the bag-check, it was a smooth run through security, although I did get the most thorough search I&#8217;ve ever experienced. I think I may be married now, or pregnant!</p> <p>My gate was really close, so I didn&#8217;t have much to do other than wait a couple of hours, listening to the conveyor saying, &#8220;Mind your step!&#8221;, every couple of seconds.</p> <p>The flight home took a little over an hour. No dramas. From there is was a taxi home and the <a href="https://www.ogh.nl/">OGh Tech Experience 2017</a> was done!</p> <p><iframe src="https://www.youtube.com/embed/SPIkq6qNmaE" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p> <p>As I said in the last post, I&#8217;m sorry to everyone for not being more involved in the event. It was out of my hands! Thanks to everyone at <a href="https://www.ogh.nl/">OGh</a> for inviting me. This trip was self-funded, but I would still like to thank the <a href="http://www.oracle.com/technetwork/community/oracle-ace/index.html">Oracle ACE Program</a> for continuing to let me fly the flag. Thanks to the attendees that supported the event and thanks to all the speakers for doing what you do! I hope to see you all soon, but in better health next time! <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/17/ogh-tech-experience-2017-the-journey-home/">OGh Tech Experience 2017 : The Journey Home</a> was first posted on June 17, 2017 at 3:51 pm.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/hE29ccFDvw0" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7237 Sat Jun 17 2017 10:51:30 GMT-0400 (EDT) OGh Tech Experience 2017 : Day 2 http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/ooQj4kqyN-I/ <p><a href="https://www.ogh.nl/"><img class="alignleft size-full wp-image-6065" src="https://oracle-base.com/blog/wp-content/uploads/2016/05/ogh.jpg" alt="" width="160" height="81" /></a>I woke up on day 2 feeling pretty dreadful, but I lay in the bath for a while, waiting for a dose of Lemsip to kick in. By the time I got out of the bath I was feeling OK-ish.</p> <p>By the time I finished the 20 minute bus ride and the short walk to the venue I wasn&#8217;t feeling so great, but the adrenalin started to kick in, which always helps. I sat for a while chatting to the people in the speaker room.</p> <p>My first session was &#8220;<a href="https://oracle-base.com/articles/misc/oracle-databases-in-the-cloud">It&#8217;s raining data! Oracle Databases in the cloud.</a>&#8221; It went a lot better than I expected. There were a lot of people in the room and I managed not to cough too much and generally stayed snot-free. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>After that there was a gap of about 2 hours until my next session. I hid in the speaker room for most of it and had another dose of Lemsip before my next session.</p> <p>My next session was &#8220;<a href="https://oracle-base.com/articles/12c/multitenant-pluggable-databases-what-they-will-break-12cr1">Pluggable databases &#8211; What they will break and why you should use them anyway!</a>&#8221; By this point the adrenalin was starting to wear off and I started to find it a little harder to find my words, getting a little tangled up a couple of times. Hopefully it wasn&#8217;t too bad for the audience.</p> <p>From there I went back to the speaker room for five minutes, then headed back to the hotel to sleep.</p> <p>I&#8217;m glad I managed to get through my sessions, but I feel bad I was not able to contribute more to the event. The fun thing about most events is interacting with everyone, as well as watching some of the other presenters. Instead I was pretty much absent for the whole event. I&#8217;ve had a few people message me asking where I was. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Sorry everyone!</p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/17/ogh-tech-experience-2017-day-2/">OGh Tech Experience 2017 : Day 2</a> was first posted on June 17, 2017 at 8:19 am.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/ooQj4kqyN-I" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7235 Sat Jun 17 2017 03:19:29 GMT-0400 (EDT) OGh Tech Experience 2017 : Day 1 – Rumours of my demise http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/3iZTp5ApKjY/ <p><a href="https://www.ogh.nl/"><img class="alignleft size-full wp-image-6065" suot;https://oracle-base.com/blog/wp-content/uploads/2016/05/ogh.jpg" alt="" width="160" height="81" /></a>For those that missed me, I did actually turn up to the event today. I arrived at about 11:00, got my badge, sat down in the speaker room for a bout 2 minutes, then left and came back to the hotel.</p> <p>I was ill most of last week and I thought I was a lot better, but the flight yesterday and the heat since I&#8217;ve been here have really put me back. My sinuses feel like they are going to explode and I have zero energy.</p> <p>I seem to be jinxed where the Netherlands are concerned. Last year <a href="/blog/2016/06/05/amsterdam-a-long-weekend-that-didnt-quite-happen/">I got ill</a> between the AMIS and OGh events. This time it&#8217;s come slap bang on the OGh event.</p> <p>Unless something changes drastically overnight, my plan for tomorrow is to arrive late, do my two presentations, then leave and get back to bed. I fly home the following morning.</p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/15/ogh-tech-experience-2017-day-1-rumours-of-my-demise/">OGh Tech Experience 2017 : Day 1 &#8211; Rumours of my demise</a> was first posted on June 15, 2017 at 6:39 pm.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/3iZTp5ApKjY" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7233 Thu Jun 15 2017 13:39:18 GMT-0400 (EDT) How to Update the ORDS_PUBLIC_USER Password http://www.thatjeffsmith.com/archive/2017/06/how-to-update-the-ords_public_user-password/ <p>ORDS_PUBLIC_USER is the database user that&#8217;s used to create your <a href="https://www.oracle.com/rest" target="_blank">ORDS</a> connection pool(s). Each database configured with ORDS gets one. </p> <p>When you publish a RESTful Service under HR on database X, ORDS resolves the call to the proper jdbc connection pool, then proxy connects from ORDS_PUBLIC_USER to user HR, and runs the SQL or PL/SQL.</p> <p>So, now imagine what happens when you let the ORDS_PUBLIC_USER password expire? Or even worse, someone does this:<br /> <div id="attachment_6205" style="width: 636px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu1.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu1.png" alt="" width="626" height="316" class="size-full wp-image-6205" /></a><p class="wp-caption-text">What could go wrong?</p></div> <p>Well, let&#8217;s see what could go wrong.</p> <p>Let&#8217;s try to start ORDS.<div id="attachment_6206" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu2.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu2.png" alt="" width="1024" height="306" class="size-full wp-image-6206" /></a><p class="wp-caption-text">Ruh-roh&#8230;</p></div> <p>In case you can&#8217;t read that text, ORDS is having an issue with one of our connection pools.</p> <p><em>SEVERE: The username or password for the connection pool named apex_pu, are invalid, expired, or the account is locked</em></p> <p>So, you could unlock the account, or simply change the password BACK to what it was when ORDS was configured for the database.</p> <p>But, what if you need to tell ORDS what the new password is instead?</p> <h3>Update the connection pool properties file.</h3> <p>Go into your ORDS config directory.</p> <p>There will be an XML file in there for each connection pool.</p> <p>Edit it with VI or notepad, and update the password field.<div id="attachment_6207" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu3.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu3.png" alt="" width="1024" height="380" class="size-full wp-image-6207" /></a><p class="wp-caption-text">This seems bad to me?</p></div> <p>Maybe you&#8217;re having a bad feeling about this. Are we really going to put the password in plain text into the config file?</p> <p>Kinda.</p> <p>Note the &#8216;!&#8217; in front of the password string. This tells ORDS to re-write the password back out hashed when it starts up. So let&#8217;s do that, and see what happens.</p> <p>Start ORDS back up.<div id="attachment_6208" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu4.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu4.png" alt="" width="1024" height="332" class="size-full wp-image-6208" /></a><p class="wp-caption-text">This looks MUCH better.</p></div> <p>OK, so ORDS is running. Let&#8217;s go back and take a look at our pool config XML file.<div id="attachment_6209" style="width: 972px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu5.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/ords_pu5.png" alt="" width="962" height="289" class="size-full wp-image-6209" /></a><p class="wp-caption-text">That&#8217;s NOT what we put in there.</p></div> <p>So the ORDS process has written the file back out.</p> <p>!<em>string</em> = ORDS, please take this new password for the pool, then write it back such that no one else can read it, please.<br /> @<em>string</em> = ORDS is using this password, but you can&#8217;t see it.<br /> <em>string</em> = ORDS, this is the actual password, don&#8217;t touch it.</p> <p>Remember, you need to restart ORDS for it to pick up any changes in its config files.</p> <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --> thatjeffsmith http://www.thatjeffsmith.com/?p=6204 Thu Jun 15 2017 13:36:16 GMT-0400 (EDT) How to get, use, and close a DB connection using the Async module https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-the-async-module/ <p>The <a href="https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-callbacks/">first pattern</a> we looked at in this series was the Node.js callback pattern. As I mentioned there, that pattern alone will only get you so far. Eventually, you&#8217;ll want to construct asynchronous workflows that process elements in a collection serially or run several tasks in parallel. You could write your own library, but why reinvent the wheel when you could just use <a href="http://caolan.github.io/async/docs.html">Async</a>, one of the most popular Node.js libraries ever. In this post, we&#8217;ll take a look at Async to see how it can help you write asynchronous code in Node.js.<br /> <span id="more-2030"></span></p> <div class="alert alert-info" role="alert"> <strong>Please Note:</strong> This post is part of <a href="https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-various-async-patterns/">a series on working with database connections using various asynchronous patterns</a>. See that post for more details and links to other options. </div> <h4>Async module overview</h4> <p>Async is not included with Node.js so it must be installed via NPM (Yarn and Bower work too) using a command like <span class="inline-code">npm install async &#8211;save</span>. A native means to reason about async processing, Promise, eventually made its way into JavaScript and Node.js. We&#8217;ll cover promises in the next part of this series. For now, let&#8217;s focus on Async. </p> <p>Once installed, you can require the library in and take advantage of its 70+ methods for various asynchronous processing situations. A glance at the documentation shows that Async&#8217;s methods fall into three main groups: Collections, Control Flow, and Utils. Let&#8217;s take a look at a couple examples from the first two groups.</p> <p>This first example uses Async&#8217;s <span class="inline-code">eachSeries</span> method to process an array one element at a time.</p> <pre class="crayon-plain-tag">const async = require('async'); const fakeAsyncApi = function(thing, callback) { setTimeout(function() { const error = Math.random() &gt; .8 ? true : false; if (error) { callback(new Error('Failed to process ' + thing)); } else { console.log(thing + ' processed'); callback(null); } }, 2000); }; const thingsToProcess = [ 'thing 1', 'thing 2', 'thing 3' ]; async.eachSeries( thingsToProcess, fakeAsyncApi, function(err) { if (err) { console.log('An error occurred!'); console.log(err); return; } console.log('All done!'); } );</pre> <p>Here&#8217;s an overview of the code above:</p> <ul> <li>Line 1: The Async library is required in after having been installed.</li> <li>Lines 3-14: A fake API that implements the Node.js callback pattern is defined. The API will occasionally simulate an error occurring so that behavior can be observed.</li> <li>Lines 16-20: An array of &#8220;things&#8221; to process is defined. Typically, the elements would be obtained from reading a file or querying a database. Each element needs to be processed using the fake API.</li> <li>Lines 22-34: Async&#8217;s <span class="inline-code">eachSeries</span> method is used the process the array. The first parameter is the array to be processed, the second parameter is a function (iteratee) that will process a single element, and the third parameter is a function that should be invoked when all work is done or immediately after an error occurs. Async will pass the iteratee one element from the array along with a callback that, when invoked, will let Async know it can move to the next element in the array.</li> </ul> <p>Copy the script to a file and run it with Node.js (don&#8217;t forget to install Async). You should see that each element is processed serially. If an error occurs, processing will stop and the final callback will be invoked immediately. </p> <p>If you change the <span class="inline-code">eachSeries</span> method to <span class="inline-code">each</span>, you&#8217;ll see that all elements are processed in parrallel. Using <span class="inline-code">eachLimit</span> (requires an additional parameter) will limit the number of functions running at the same time. Pretty cool, huh?</p> <p>Here&#8217;s an example of a Control Flow method, <span class="inline-code">series</span>, which takes an array of functions and executes them one at a time.</p> <pre class="crayon-plain-tag">const async = require('async'); const fakeAsyncApi = function(taskName, timeout, callback) { setTimeout(function() { const error = Math.random() &gt; .8 ? true : false; if (error) { callback(new Error('Failed to process ' + taskName)); } else { console.log(taskName + ' complete'); callback(null); } }, timeout); }; async.series( [ function(callback) { fakeAsyncApi('task 1', 2000, callback); }, function(callback) { fakeAsyncApi('task 2', 1500, callback); }, function(callback) { fakeAsyncApi('task 3', 3000, callback); } ], function(err) { if (err) { console.log('An error occurred!'); console.log(err); return; } console.log('All done!'); } );</pre> <p>Here&#8217;s a rundown of the script above:</p> <ul> <li>Line 1: The Async library is required in after having been installed.</li> <li>Lines 3-14: A fake API that implements the Node.js callback pattern is defined. The API will occasionally simulate an error occurring so that behavior can be observed.</li> <li>Lines 16-37: Async’s <span class="inline-code">series</span> method is used to process a number of asynchronous tasks/functions. The first parameter is the arrays of functions, each of which is passed a callback used to indicate when its work is complete. The second parameter is a function that will be invoked when all tasks have completed or immediately after an error occurs.</li> </ul> <p>If you copy the script to a file and run it with Node.js, you&#8217;ll see that it behaves very much like the first script, only it works with tasks rather than elements in an array. If you replace <span class="inline-code">series</span> with <span class="inline-code">parallel</span> the tasks will run at the same time.</p> <p>As you can see, Async extends the Node.js callback pattern, adding many handy methods that make quick work of various asynchronous flows. The library includes many more methods that can help with specific use cases, such as <span class="inline-code">waterfall</span>, <span class="inline-code">queue</span>, and <span class="inline-code">race</span>. Try to be aware of what&#8217;s avaialble so you can leverage it if needed.</p> <h4>Async module demo app</h4> <p>The Async demo app is comprised of the following four files. The files are also available via <a href="https://gist.github.com/dmcghan/9e507fbd5383d9f768364f8d4d3fdecf">this Gist</a>.</p> <pre class="crayon-plain-tag">{ &quot;name&quot;: &quot;async-module&quot;, &quot;version&quot;: &quot;1.0.0&quot;, &quot;description&quot;: &quot;&quot;, &quot;main&quot;: &quot;index.js&quot;, &quot;scripts&quot;: { &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot; }, &quot;keywords&quot;: [], &quot;author&quot;: &quot;Dan McGhan &lt;dan.mcghan@oracle.com&gt; (https://jsao.io/)&quot;, &quot;license&quot;: &quot;ISC&quot;, &quot;dependencies&quot;: { &quot;async&quot;: &quot;^2.4.1&quot;, &quot;oracledb&quot;: &quot;^1.13.1&quot; } }</pre> <p>This is a very basic <span class="inline-code">package.json</span> file. Note that both async and oracledb are listed as depenencies.</p> <pre class="crayon-plain-tag">const oracledb = require('oracledb'); const async = require('async'); const dbConfig = require('./db-config.js'); const employees = require('./employees.js'); async.series( [ function(callback) { oracledb.createPool(dbConfig, function(err) { callback(err); }); }, function(callback) { employees.getEmployee(101, function(err, emp) { if (err) { callback(err); return; } console.log(emp); }); }, ], function(err) { if (err) { console.log(err); } } );</pre> <p>In this version of the <span class="inline-code">index.js</span>, Async&#8217;s <span class="inline-code">series</span> method is used to first create a connection pool and then to fetch an employee. Although the pool is passed to the callback function for <span class="inline-code">createPool</span>, it&#8217;s not referenced here as the <a href="https://github.com/oracle/node-oracledb/blob/master/doc/api.md#-831-connection-pool-cache">built-in pool cache</a> will be used in <span class="inline-code">employees.js</span>.</p> <pre class="crayon-plain-tag">module.exports = { user: 'hr', password: 'oracle', connectString: '192.168.56.101:1521/orcl', poolMax: 20, poolMin: 20, poolIncrement: 0 };</pre> <p>The <span class="inline-code">db-config.js</span> file is used in <span class="inline-code">index.js</span> to provide the connection info for the database. This configuration should work with <a href="https://jsao.io/2017/05/creating-a-sandbox-for-learning-nodejs-and-oracle-database/">the DB App Dev VM</a>, but it will need to be adjusted for other environments.</p> <pre class="crayon-plain-tag">const oracledb = require('oracledb'); const async = require('async'); function getEmployee(empId, getEmployeeCallback) { async.waterfall( [ function(callback) { oracledb.getConnection(function(err, conn) { if (err) { console.log('Error getting connection', err); } else { console.log('Connected to database'); } callback(err, conn); }); }, function(conn, callback) { conn.execute( `select * from employees where employee_id = :emp_id`, [empId], { outFormat: oracledb.OBJECT }, function(err, result) { if (err) { console.log('Error executing query', err); } else { console.log('Query executed'); } callback(err, conn, result); } ); } ], function(err, conn, result) { if (err) { getEmployeeCallback(err); } else { getEmployeeCallback(null, result.rows[0]); } // If error getting conn, no need to close. if (conn) { conn.close(function(err) { if (err) { console.log('Error closing connection', err); } else { console.log('Connection closed'); } }); } } ); } module.exports.getEmployee = getEmployee;</pre> <p>This version of the <span class="inline-code">employees.js</span> file uses Async&#8217;s <span class="inline-code">waterfall</span> method to get a connection to the database, use it to execute a query, and then close a connection. I chose <span class="inline-code">waterfall</span> over, say, <span class="inline-code">series</span> because it allows me to pass the connection obtained in the first task along to the next task. There are other ways to manage state with <span class="inline-code">series</span>.</p> <p>The logic to close the connection was put in the final function (not in the list of tasks), as that will be invoked if the tasks complete successfully or if an error occurs &#8211; much like <span class="inline-code">finally</span> in <span class="inline-code">try&#8230;catch&#8230;finally</span>.</p> <p>Hopefully, you now see how powerful the Async module can be. Check out the next part of the series to see how to use promises to do the same work.</p> danmcghan https://jsao.io/?p=2030 Thu Jun 15 2017 10:08:51 GMT-0400 (EDT) LEAP#321 The Boldport Club Cordwood Too http://blog.tardate.com/2017/06/leap321-boldportclub-cordwood-too.html <p>The original <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/cordwood">Cordwood Puzzle</a> became an instant classic with club members, and the concept returns this year with a brand new puzzle. The cordwoods evoke an era of stuffing massive components into small spaces. This is real hardware! As before, it really is a puzzle, so if you don’t want any spoilers - read no further. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/cordwood-too">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/cordwood-too"><img src="http://leap.tardate.com/BoldportClub/cordwood-too/assets/cordwood-too_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/06/leap321-boldportclub-cordwood-too.html Thu Jun 15 2017 07:53:15 GMT-0400 (EDT) OGh Tech Experience 2017 : The Journey Begins http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/ln4LjVdOe58/ <p><a href="https://www.ogh.nl"><img class="alignleft size-full wp-image-6065" src="https://oracle-base.com/blog/wp-content/uploads/2016/05/ogh.jpg" alt="" width="160" height="81" /></a>For a change I was able to book a flight at a reasonable time of day, so I didn&#8217;t have to get up stupidly early. The downside of that was I didn&#8217;t do anything the night before, so I spent the morning rushing around getting myself ready, which included a cold bath since my boiler has broken. Amazing luck I&#8217;m having recently! <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>I had a good chat with my taxi driver on the way to the airport, which makes the journey so much better. At the airport I was presented with massive queues for security. Fortunately they moved pretty quickly, so it was not as bad as it looked.</p> <p>Once through security I went to get some coffee, which is where a douchebag in a suit with a phone at his ear walked straight past me, obviously waiting to be served, and ordered a coffee. I&#8217;m about 6 foot tall in shoes and weigh 18 stone. I would have thought that was pretty hard to miss, but aparently I&#8217;m invisible to entitled arseholes!</p> <p>The flight to Amsterdam was pretty straight forward, taking a little over an hour. There were some issues with the plane, so we had to use a smaller one instead. We were a little late leaving, but nothing major. It was a 50 minute train ride from Schiphol to Amersfoort, then a 10 minute taxi ride to my hotel.</p> <p><iframe src="https://www.youtube.com/embed/PgzHraAqmLE" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p> <p>The <a href="https://www.ogh.nl/page.aspx?event=368">OGh Tech Experience 2017</a> conference starts tomorrow, but I don&#8217;t have any presentations until the following day, so tomorrow is an easy day for me. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/14/ogh-tech-experience-2017-the-journey-begins/">OGh Tech Experience 2017 : The Journey Begins</a> was first posted on June 14, 2017 at 10:19 pm.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/ln4LjVdOe58" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7231 Wed Jun 14 2017 17:19:07 GMT-0400 (EDT) JDev/ADF sample - Nice Trick to Get ADF LOV Description Text http://andrejusb-samples.blogspot.com/2017/06/jdevadf-sample-nice-trick-to-get-adf.html <div dir="ltr" style="text-align: left;" trbidi="on"><ul><li><a href="http://andrejusb.blogspot.lt/2017/06/nice-trick-to-get-adf-lov-description.html" target="_blank">Nice Trick to Get ADF LOV Description Text</a>. I will tell you about nice trick to display LOV description. Usually you would create separate attribute in VO for LOV description and base LOV on this attribute (read about it in my previous post - <a href="http://andrejusb.blogspot.lt/2009/11/defining-lov-on-reference-attribute-in.html" target="_blank">Defining the LOV on a Reference Attribute in Oracle ADF 11g</a>). But there is one more way - it makes it much faster to define LOV on description, but you should be aware about additional SQL statement executed to fetch description text.</li></ul><ol>Download - <a href="https://docs.google.com/uc?export=download&amp;id=0Bw_kr1_tXc-eOVV4cXRlTzZGUm8">ADFLovDescriptionApp.zip</a></ol></div> Andrejus Baranovskis tag:blogger.com,1999:blog-4301764760924839143.post-311771356952900019 Wed Jun 14 2017 13:33:00 GMT-0400 (EDT) Single-Tenant over bequeath connections http://laurentschneider.com/wordpress/2017/06/single-tenant-over-bequeath-connections.html <p>If you follow Oracle recommendation to use SingleTenant CDB instead of Non-CDB, then a lot of things will break.</p> <p>I won&#8217;t go into details, but basically, in this new architecture, you have one core container, called CDB$ROOT, which is the default container where you connect to if you connect locally<br /> <pre><code> sqlplus / as sysdba SQL&gt; select cdb from v$database; CDB --- YES SQL&gt; select sys_context(&#039;USERENV&#039;,&#039;CON_NAME&#039;) from dual; SYS_CONTEXT(&#039;USERENV&#039;,&#039;CON_NAME&#039;) --------------------------------- CDB$ROOT SQL&gt; select con_id, NAME from V$CONTAINERS &nbsp;&nbsp;&nbsp;&nbsp;CON_ID NAME ---------- ---------- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 CDB$ROOT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 PDB$SEED &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 ST01 </code></pre></p> <p>Then you&#8217;ll soon realise, you can no longer do what you used to do<br /> <pre><code> SQL&gt; create user u identified by u; create user u identified by u &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* ERROR at line 1: ORA-65096: invalid common user or role name </code></pre></p> <p>Some scripts still run in the root container. SHUTDOWN ABORT, ALTER SYSTEM SWITCH LOGFILE. Doing a full backup or clone probably won&#8217;t hurt you much. Relatively.. </p> <p>But now let&#8217;s imagine I have a very simple and very old script to lock scott<br /> <pre><code> vintage.sh: &nbsp;&nbsp;echo &quot;alter user scott account lock;&quot;| &nbsp;&nbsp;&nbsp;&nbsp;sqlplus -s / as sysdba </code></pre><br /> This won&#8217;t work. I need to lock scott in the SingleTenant container ST01.</p> <p>I could do this in the container<br /> <pre><code> SQL&gt; alter session set container=ST01; &nbsp;&nbsp;Session altered. SQL&gt; alter user scott account lock; &nbsp;&nbsp;User altered. </code></pre></p> <p>So fine, so good. NOW : how do I make this work <b>without</b> changing the script ? </p> <p>Remember, non-cdb database, as they were used in Oracle 11, 10, 9, 8, 7 &#8230; are now deprecated. Remember, cdb is recommended. Now face it : it&#8217;ll break your dba scripts.</p> <p>As a production dba, I don&#8217;t want to rewrite all the existing scripts. Some are ultra-old and used by people who did not write them. </p> <p>One method for my script would be to change the container in a login script.<br /> <pre><code> echo &quot;alter session set container=ST01;&quot; &gt; /tmp/login.sql export ORACLE_PATH=/tmp vintage.sh &nbsp;&nbsp;Session altered. &nbsp;&nbsp;User altered.&nbsp;&nbsp; </code></pre><br /> (ORACLE_PATH in latest 12.1 and in 12.2, SQL_PATH in older release)</p> <p>However, if my script must work with both CDB and non-CDB, I need to set the container in only this case.</p> <p>In my login.sql, I first tried to implement some plsql logic, but alter session set container is not working (aka working with limitation) with execute immediate.</p> <p>As well, I don&#8217;t want my script to break Oracle 11.</p> <p>So I decide to do some sqlplus magic with defined variable.</p> <p><pre><code> set ver off feed off -- 1) check if the column v$database.cdb exists col column_name new_v cdb nopri def cdb=null select column_name from dba_tab_columns where owner=&#039;SYS&#039; and table_name=&#039;V_$DATABASE&#039; and column_name=&#039;CDB&#039;; -- 2) if cdb is YES, then select a dynamic statement using V$PDB col pdb new_v pdb nopri def pdb=&quot;null stmt from dual where 1=0&quot; select &#039;&#039;&#039;set container=&quot;&#039;&#039;||name||&#039;&#039;&quot;&039;&#039; stmt from v$pdbs where name!=&#039;&#039;PDB$SEED&#039;&#039;&#039; &nbsp;&nbsp;pdb from v$database where &amp;cdb=&#039;YES&#039;; -- 3) get a dynamic alter session statement. I use a dummy flagger for non-cdb col stmt new_val stmt nopri def stmt=&quot;SET FLAGGER=OFF&quot; select &amp;pdb; -- 4) alter session alter session &amp;stmt; set feed 6 col column_name clear col stmt clear col pdb clear undef cdb undef stmt undef pdb del </code></pre></p> <p>Now I run my script<br /> <pre><code> 11g: ./vintage.sh User altered. 12c-non-cdb: ./vintage.sh User altered. 12cR2-single-tenant: ./vintage.sh User altered. </code></pre></p> <p><i>DISCLAIMER: you shouldn&#8217;t use a global login.sql and you should know that secretly fixing old scripts may have side effects. Test, test and retest your code</i><br /> <i>DISCLAIMER 2: my frequent readers surely wonder if this statement generating a statement generating a statement is for an obfuscation contest</i></p> Laurent Schneider http://laurentschneider.com/?p=2466 Wed Jun 14 2017 11:46:42 GMT-0400 (EDT) Unpivot https://jonathanlewis.wordpress.com/2017/06/14/unpivot/ <p>An interesting observation appeared recently as a side-channel on <a href="https://community.oracle.com/thread/4054233"><em><strong>a question on the OTN database forum</strong></em></a> &#8211; how does Oracle execute an <em><strong>unpivot()</strong></em> operation. Here&#8217;s an example of such a query:</p> <pre class="brush: plain; title: ; notranslate"> rem rem Script: unpivot_2.sql rem Author: Jonathan Lewis rem Dated: June 2017 rem create table t1( id, col1, col2, col3, col4, col5, padding ) cache pctfree 95 pctused 5 -- compress for query low as select 1, 100 , 200 , 300 , 400 , 500,rpad('x',100) from all_objects where rownum &lt;= 50000 ; execute dbms_stats.gather_table_stats(user,'t1',method_opt=&gt;'for all columns size 1') select /*+ gather_plan_statistics find this */ id, max(val) as high_val from t1 unpivot include nulls ( val for source in (col1, col2, col3, col4, col5) ) group by id order by id ; </pre> <p>I&#8217;ve created a table with 50,000 rows (<em><strong>all_objects</strong></em> is quite large in 12.1.0.2 and 12.2.0.1), but with lots of free space per block so that I get three rows per block for a total of roughly 16,667 blocks which is going to make it fairly easy to spot any interesting session statistics. Then I&#8217;ve used an <em><strong>unpivot()</strong></em> call that has the effect of turning one row with five columns into five rows with one column.</p> <p>Here&#8217;s the basic execution plan for the query (as pulled from memory):</p> <pre class="brush: plain; title: ; notranslate"> ------------------------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Starts | E-Rows | Cost (%CPU)| A-Rows | A-Time | Buffers | OMem | 1Mem | Used-Mem | ------------------------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | | 10695 (100)| 1 |00:00:00.18 | 16671 | | | | | 1 | SORT GROUP BY | | 1 | 1 | 10695 (2)| 1 |00:00:00.18 | 16671 | 2048 | 2048 | 2048 (0)| | 2 | VIEW | | 1 | 250K| 10653 (2)| 250K|00:00:01.41 | 16671 | | | | | 3 | UNPIVOT | | 1 | | | 250K|00:00:00.52 | 16671 | | | | | 4 | TABLE ACCESS FULL| T1 | 1 | 50000 | 2131 (2)| 50000 |00:00:00.12 | 16671 | | | | ------------------------------------------------------------------------------------------------------------------------------- </pre> <p>According to the plan Oracle has done one full tablescan on the data (<em><strong>Starts</strong></em> = 1), but the <em><strong>unpivot</strong></em> operation has used this to produce 250,000 rows of output from 50,000 rows (<em><strong>A-Rows</strong></em>=) of input. Note, however, that the cost of the <em><strong>view</strong> </em>operation is 5 times the cost of the tablescan but, on the other hand, the number of buffers visited is 16,671 (which matches the size of the table). So have we done 5 tablescans with a <em><strong>union all</strong></em>, or have we done one tablescan ?</p> <p>The next step is to look at the 10053 (optimizer) trace file, specifically for the <strong><em>&#8220;unparsed query&#8221;</em></strong> which (despite the final plan table showing the plan we&#8217;ve just seen above) looked like this &#8211; after applying a few purely cosmetic changes:</p> <pre class="brush: plain; title: ; notranslate"> Final query after transformations:******* UNPARSED QUERY IS ******* SELECT &quot;from$_subquery$_002&quot;.&quot;ID&quot; &quot;ID&quot;,MAX(&quot;from$_subquery$_002&quot;.&quot;VAL&quot;) &quot;HIGH_VAL&quot; FROM ( (SELECT &quot;T1&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;T1&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL1' &quot;SOURCE&quot;,&quot;T1&quot;.&quot;COL1&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;T1&quot;) UNION ALL (SELECT &quot;T1&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;T1&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL2' &quot;SOURCE&quot;,&quot;T1&quot;.&quot;COL2&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;T1&quot;) UNION ALL (SELECT &quot;T1&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;T1&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL3' &quot;SOURCE&quot;,&quot;T1&quot;.&quot;COL3&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;T1&quot;) UNION ALL (SELECT &quot;T1&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;T1&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL4' &quot;SOURCE&quot;,&quot;T1&quot;.&quot;COL4&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;T1&quot;) UNION ALL (SELECT &quot;T1&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;T1&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL5' &quot;SOURCE&quot;,&quot;T1&quot;.&quot;COL5&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;T1&quot;) ) &quot;from$_subquery$_002&quot; GROUP BY &quot;from$_subquery$_002&quot;.&quot;ID&quot; ORDER BY &quot;from$_subquery$_002&quot;.&quot;ID&quot; ; </pre> <p>And then there&#8217;s the <em><strong>outline</strong></em> (which I can see in the 10053 trace, or in the plan pulled from memory by a call to <em><strong>dbms_xplan.display_cursor()</strong></em>).</p> <pre class="brush: plain; title: ; notranslate"> Outline Data ------------- /*+ BEGIN_OUTLINE_DATA IGNORE_OPTIM_EMBEDDED_HINTS OPTIMIZER_FEATURES_ENABLE('12.1.0.2') DB_VERSION('12.1.0.2') ALL_ROWS OUTLINE_LEAF(@&quot;SEL$1&quot;) OUTLINE_LEAF(@&quot;SEL$2&quot;) OUTLINE_LEAF(@&quot;SEL$3&quot;) OUTLINE_LEAF(@&quot;SEL$4&quot;) OUTLINE_LEAF(@&quot;SEL$5&quot;) OUTLINE_LEAF(@&quot;SET$1&quot;) OUTLINE_LEAF(@&quot;SEL$6&quot;) NO_ACCESS(@&quot;SEL$6&quot; &quot;from$_subquery$_002&quot;@&quot;SEL$6&quot;) FULL(@&quot;SEL$5&quot; &quot;T1&quot;@&quot;SEL$5&quot;) FULL(@&quot;SEL$4&quot; &quot;T1&quot;@&quot;SEL$4&quot;) FULL(@&quot;SEL$3&quot; &quot;T1&quot;@&quot;SEL$3&quot;) FULL(@&quot;SEL$2&quot; &quot;T1&quot;@&quot;SEL$2&quot;) FULL(@&quot;SEL$1&quot; &quot;T1&quot;@&quot;SEL$1&quot;) END_OUTLINE_DATA */ </pre> <p>And if I also pull the <em><strong>alias</strong></em> (query block and fully qualified table name) information from memory:</p> <pre class="brush: plain; title: ; notranslate"> Query Block Name / Object Alias (identified by operation id): ------------------------------------------------------------- 1 - SEL$6 2 - SET$1 / from$_subquery$_002@SEL$6 3 - SET$1 4 - SEL$5 / T1@SEL$5 </pre> <p>Then there&#8217;s the alternative (<a href="https://jonathanlewis.wordpress.com/2012/07/10/expanding-sql/"><em><strong>though not necessarily correct</strong></em></a>) way to find an <em><strong>&#8220;unparsed&#8221;</strong></em> version of the query &#8211; <em><strong>dbms_sql2.expand_sql_text()</strong></em> in 11g, <em><strong>dbms_utility.expand_sql_text()</strong></em> in 12c:</p> <pre class="brush: plain; title: ; notranslate"> variable m_sql_out clob declare m_sql_in clob := 'select /*+ gather_plan_statistics find this */ id, max(val) as high_val from t1 unpivot include nulls ( val for source in (col1, col2, col3, col4, col5) ) group by id order by id ' ; begin -- dbms_sql2.expand_sql_text( -- 11g dbms_utility.expand_sql_text( -- 12c m_sql_in, :m_sql_out ); end; / set long 20000 print m_sql_out M_SQL_OUT -------------------------------------------------------------------------------- SELECT &quot;A1&quot;.&quot;ID&quot; &quot;ID&quot;,MAX(&quot;A1&quot;.&quot;VAL&quot;) &quot;HIGH_VAL&quot; FROM ( (SELECT &quot;A3&quot;.&quot;ID&quot; &quot;ID&quot;, &quot;A3&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL1' &quot;SOURCE&quot;,&quot;A3&quot;.&quot;COL1&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;A3&quot;) UNION ALL (SELECT &quot;A4&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;A4&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL2' &quot;SOURCE &quot;,&quot;A4&quot;.&quot;COL2&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;A4&quot;) UNION ALL (SELECT &quot;A5&quot;.&quot;ID&quot; &quot;ID &quot;,&quot;A5&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL3' &quot;SOURCE&quot;,&quot;A5&quot;.&quot;COL3&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T 1&quot; &quot;A5&quot;) UNION ALL (SELECT &quot;A6&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;A6&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL4' &quot;SOUR CE&quot;,&quot;A6&quot;.&quot;COL4&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;A6&quot;) UNION ALL (SELECT &quot;A7&quot;.&quot;ID&quot; &quot; ID&quot;,&quot;A7&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL5' &quot;SOURCE&quot;,&quot;A7&quot;.&quot;COL5&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;. &quot;T1&quot; &quot;A7&quot;)) &quot;A1&quot; GROUP BY &quot;A1&quot;.&quot;ID&quot; ORDER BY &quot;A1&quot;.&quot;ID&quot; </pre> <p>So at some level the optimizer does think it&#8217;s doing 5 tablescans &#8211; and the <em><strong>t1</strong></em> reported in the <em><strong>unpivot</strong></em> plan is from the fifth (i.e. last) copy of the table in the <em><strong>union all</strong></em>. But the execution statistics and the session statistics say I&#8217;ve done just one tablescan &#8211; and this persists even when I make the table so large that it (a) won&#8217;t fit the buffer cache, and/or (b) uses direct path reads, and/or (c) runs under Exadata with Hybrid columnar compression.</p> <p>So what&#8217;s (probably) happening ?</p> <p>I think Oracle has a code path that says it&#8217;s doing a <em><strong>union all</strong></em> of tablescans (at least for this example) but tells it that the <em><strong>union all</strong></em> is there as an expansion of an <em><strong>unpivot</strong></em> so (sticking with an example that does a tablescan into the buffer cache) Oracle reads the number of blocks dictated by the current multiblock read count into the cache, pins that one batch of blocks, scans the batch (or, possibly, each block in turn) 5 times (or as required), unpins the batch and then reads the next batch. So the session does five tablescans but does them in a way that lets you see only one tablescan in the statistics.</p> <h3>Footnote</h3> <p>There was a change in the results when I tested this on 12.2.0.1; the unparsed query reported only a two-part <em><strong>union all</strong></em> subquery, and the table alias information in the plan identified the referenced table as the copy of the table from the second (i.e. still last) subquery in the <em><strong>union all</strong></em>. More significantly the cost of the VIEW operation was a close match to the cost of a single tablescan, rather than being a multiple thereof:</p> <pre class="brush: plain; title: ; notranslate"> select * from table(dbms_xplan.display_cursor('1k077bzp0t6mn',null,'outline alias cost ---------------------------------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Starts | E-Rows | Cost (%CPU)| A-Rows | A-Time | Buffers | Reads | OMem | 1Mem | Used-Mem | ---------------------------------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | | 1117 (100)| 1 |00:00:00.13 | 8350 | 8334 | | | | | 1 | SORT GROUP BY | | 1 | 250K| 1117 (6)| 1 |00:00:00.13 | 8350 | 8334 | 2048 | 2048 | 2048 (0)| | 2 | VIEW | | 1 | 250K| 1076 (2)| 250K|00:00:00.13 | 8350 | 8334 | | | | | 3 | UNPIVOT | | 1 | | | 250K|00:00:00.09 | 8350 | 8334 | | | | | 4 | TABLE ACCESS FULL| T1 | 1 | 50000 | 1074 (2)| 50000 |00:00:00.07 | 8350 | 8334 | | | | ---------------------------------------------------------------------------------------------------------------------------------------- Query Block Name / Object Alias (identified by operation id): ------------------------------------------------------------- 1 - SEL$3 2 - SET$1 / from$_subquery$_002@SEL$3 3 - SET$1 4 - SEL$2 / T1@SEL$2 Outline Data ------------- /*+ BEGIN_OUTLINE_DATA IGNORE_OPTIM_EMBEDDED_HINTS OPTIMIZER_FEATURES_ENABLE('12.2.0.1') DB_VERSION('12.2.0.1') ALL_ROWS OUTLINE_LEAF(@&quot;SEL$1&quot;) OUTLINE_LEAF(@&quot;SEL$2&quot;) OUTLINE_LEAF(@&quot;SET$1&quot;) OUTLINE_LEAF(@&quot;SEL$3&quot;) NO_ACCESS(@&quot;SEL$3&quot; &quot;from$_subquery$_002&quot;@&quot;SEL$3&quot;) FULL(@&quot;SEL$2&quot; &quot;T1&quot;@&quot;SEL$2&quot;) END_OUTLINE_DATA */ M_SQL_OUT -------------------------------------------------------------------------------- SELECT &quot;A1&quot;.&quot;ID&quot; &quot;ID&quot;,MAX(&quot;A1&quot;.&quot;VAL&quot;) &quot;HIGH_VAL&quot; FROM (SELECT &quot;A3&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;A 3&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL1' &quot;SOURCE&quot;,&quot;A3&quot;.&quot;COL1&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot; A3&quot; UNION ALL SELECT &quot;A3&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;A3&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL2' &quot;SOURCE&quot;,&quot;A3 &quot;.&quot;COL2&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;A3&quot; UNION ALL SELECT &quot;A3&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;A3&quot;.&quot; PADDING&quot; &quot;PADDING&quot;,'COL3' &quot;SOURCE&quot;,&quot;A3&quot;.&quot;COL3&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;A3&quot; UNION ALL SELECT &quot;A3&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;A3&quot;.&quot;PADDING&quot; &quot;PADDING&quot;,'COL4' &quot;SOURCE&quot;,&quot;A3&quot;.&quot;C OL4&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;A3&quot; UNION ALL SELECT &quot;A3&quot;.&quot;ID&quot; &quot;ID&quot;,&quot;A3&quot;.&quot;PADD ING&quot; &quot;PADDING&quot;,'COL5' &quot;SOURCE&quot;,&quot;A3&quot;.&quot;COL5&quot; &quot;VAL&quot; FROM &quot;TEST_USER&quot;.&quot;T1&quot; &quot;A3&quot;) &quot;A1 &quot; GROUP BY &quot;A1&quot;.&quot;ID&quot; ORDER BY &quot;A1&quot;.&quot;ID&quot; allstats last')); </pre> <p>It used to be hard enough working out what the run-time engine was doing when the optimizer and the run-time engine claimed that they were working on the same (transformed version of the) SQL; but now we can get the impression that the optimizer is directing the run-time engine to execute a plan that couldn&#8217;t possibly match the (unparsed) query that the optimizer had been considering.</p><br /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jonathanlewis.wordpress.com/17270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jonathanlewis.wordpress.com/17270/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=jonathanlewis.wordpress.com&#038;blog=491988&#038;post=17270&#038;subd=jonathanlewis&#038;ref=&#038;feed=1" width="1" height="1" /> Jonathan Lewis http://jonathanlewis.wordpress.com/?p=17270 Wed Jun 14 2017 10:46:24 GMT-0400 (EDT) Swagger UI with Spring Boot 1.5.x http://feedproxy.google.com/~r/blogspot/PEqWE/~3/d_vSuCPJAtw/swagger-ui-with-spring-boot-15x.html I recently created this demo / blog entry on using HTTPIE with Spring Boot Rest Repositories as shown below.<br /><br /><a href="http://theblasfrompas.blogspot.com.au/2017/05/using-httpie-with-spring-boot-rest.html">http://theblasfrompas.blogspot.com.au/2017/05/using-httpie-with-spring-boot-rest.html</a><br /><br />I decided to take that same example and add Swagger UI to the RESTful endpoints. The full source code is here.<br /><br /><a href="https://github.com/papicella/httpie-springboot">https://github.com/papicella/httpie-springboot</a><br /><br />In short what you need is the following maven dependancies and that will add all you need. I found it works much cleaner if you use the same version of both these dependancies for some reason<br /><pre class="brush: xml"> <br />&lt;dependency&gt;<br /> &lt;groupId&gt;io.springfox&lt;/groupId&gt;<br /> &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;<br /> &lt;version&gt;2.6.1&lt;/version&gt;<br />&lt;/dependency&gt;<br />&lt;dependency&gt;<br /> &lt;groupId&gt;io.springfox&lt;/groupId&gt;<br /> &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;<br /> &lt;version&gt;2.6.1&lt;/version&gt;<br />&lt;/dependency&gt;<br /></pre><br />Finally a Class file describing the config and enabling Swagger is required as follows<br /><pre class="brush: java"> <br />package pivotal.io.boot.httpie.demo;<br /><br />import org.springframework.context.annotation.Bean;<br />import org.springframework.context.annotation.Configuration;<br />import springfox.documentation.builders.RequestHandlerSelectors;<br />import springfox.documentation.service.ApiInfo;<br />import springfox.documentation.service.Contact;<br />import springfox.documentation.spi.DocumentationType;<br />import springfox.documentation.spring.web.plugins.Docket;<br />import springfox.documentation.swagger2.annotations.EnableSwagger2;<br /><br />import static springfox.documentation.builders.PathSelectors.regex;<br /><br />@Configuration<br />@EnableSwagger2<br />public class SwaggerConfig<br />{<br /> @Bean<br /> public Docket swaggerSpringMvcPlugin() {<br /> return new Docket(DocumentationType.SWAGGER_2)<br /> .select()<br /> .apis(RequestHandlerSelectors.basePackage("pivotal.io.boot.httpie.demo"))<br /> .paths(regex("/api/employee/emps.*"))<br /> .build()<br /> .apiInfo(metaData());<br /> }<br /><br /> private ApiInfo metaData() {<br /> ApiInfo apiInfo = new ApiInfo(<br /> "Spring Boot Employee REST API",<br /> "Spring Boot Employee REST API",<br /> "1.0",<br /> "Terms of service",<br /> new Contact("Pas Apicella", "https://www.blogger.com/profile/09389663166398991762", "papicella@pivotal.io"),<br /> "Apache License Version 2.0",<br /> "https://www.apache.org/licenses/LICENSE-2.0");<br /> return apiInfo;<br /> }<br />}<br /></pre><br />The GitHub repo also included a Pivotal Cloud Foundry <b>manifest.yml</b> file to make it easy to deploy to Pivotal Cloud Foundry. The example uses a static hostname BUT can easily be changed to use a random-route or alter the hostname itself.<br /><br /><span style="color: #3d85c6;">applications:</span><br /><span style="color: #3d85c6;">- name: pas-swagger-demo</span><br /><span style="color: #3d85c6;">&nbsp; memory: 1G</span><br /><span style="color: #3d85c6;">&nbsp; instances: 1</span><br /><span style="color: #3d85c6;">&nbsp; hostname: pas-swagger-demo</span><br /><span style="color: #3d85c6;">&nbsp; path: ./target/httpie-springboot-0.0.1-SNAPSHOT.jar</span><br /><span style="color: #3d85c6;">&nbsp; env:</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; JAVA_OPTS: -Djava.security.egd=file:///dev/urando</span><br /><br />Then it's the simple "<b>cf push</b>"<br /><br /><b>$ cf push</b><br /><br /><span style="color: #3d85c6;">pasapicella@pas-macbook:~/piv-projects/httpie-springboot$ cf push</span><br /><span style="color: #3d85c6;">Using manifest file /Users/pasapicella/piv-projects/httpie-springboot/manifest.yml</span><br /><span style="color: #3d85c6;"><br /></span><span style="color: #3d85c6;">Creating app pas-swagger-demo in org apples-pivotal-org / space development as papicella@pivotal.io...</span><br /><span style="color: #3d85c6;">OK</span><br /><span style="color: #3d85c6;"><br /></span><span style="color: #3d85c6;">Creating route pas-swagger-demo.cfapps.io...</span><br /><span style="color: #3d85c6;">OK</span><br /><span style="color: #3d85c6;"><br /></span><span style="color: #3d85c6;">..</span><br /><span style="color: #3d85c6;"><br /></span><span style="color: #3d85c6;">Showing health and status for app pas-swagger-demo in org apples-pivotal-org / space development as papicella@pivotal.io...</span><br /><span style="color: #3d85c6;">OK</span><br /><span style="color: #3d85c6;"><br /></span><span style="color: #3d85c6;">requested state: started</span><br /><span style="color: #3d85c6;">instances: 1/1</span><br /><span style="color: #3d85c6;">usage: 1G x 1 instances</span><br /><span style="color: #3d85c6;">urls: pas-swagger-demo.cfapps.io</span><br /><span style="color: #3d85c6;">last uploaded: Wed Jun 14 03:32:31 UTC 2017</span><br /><span style="color: #3d85c6;">stack: cflinuxfs2</span><br /><span style="color: #3d85c6;">buildpack: container-certificate-trust-store=2.0.0_RELEASE java-buildpack=v3.15-offline-https://github.com/cloudfoundry/java-buildpack.git#a3a9e61 java-main java-opts open-jdk-like-jre=1.8.0_121 open-jdk-like-memory-calculator=2.0.2_RELEASE spring-auto-reconfigur...</span><br /><span style="color: #3d85c6;"><br /></span><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp;state &nbsp; &nbsp; since &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cpu &nbsp; &nbsp; &nbsp;memory &nbsp; &nbsp; &nbsp; &nbsp; disk &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; details</span><br /><span style="color: #3d85c6;">#0 &nbsp; running &nbsp; 2017-06-14 01:33:40 PM &nbsp; 291.5% &nbsp; 510.9M of 1G &nbsp; 154.9M of 1G</span><br /><br /><br />The application is running on Pivotal Web Services as follows:<br /><br /><a href="http://pas-swagger-demo.cfapps.io/swagger-ui.html">http://pas-swagger-demo.cfapps.io/swagger-ui.html</a><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-9QoOJEBa1lM/WUCwi1NPHkI/AAAAAAAAA9M/LFoaPb9an1E5SN76dsQIPt1Mh_VNi-6bgCLcBGAs/s1600/Screen%2BShot%2B2017-06-14%2Bat%2B1.41.28%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="557" data-original-width="1227" height="145" src="https://1.bp.blogspot.com/-9QoOJEBa1lM/WUCwi1NPHkI/AAAAAAAAA9M/LFoaPb9an1E5SN76dsQIPt1Mh_VNi-6bgCLcBGAs/s320/Screen%2BShot%2B2017-06-14%2Bat%2B1.41.28%2BPM.png" width="320" /></a></div><br /><br /><div class="blogger-post-footer">http://feeds.feedburner.com/TheBlasFromPas</div><img src="http://feeds.feedburner.com/~r/blogspot/PEqWE/~4/d_vSuCPJAtw" height="1" width="1" alt=""/> Pas Apicella tag:blogger.com,1999:blog-6527688743456205256.post-4055326280490136968 Wed Jun 14 2017 00:00:00 GMT-0400 (EDT) LEAP#320 Synchronous JK Counter http://blog.tardate.com/2017/06/leap320-synchronous-jk-counter.html <p>A synchronous counter changes its output bits simultaneously, with no ripple. This project implements a classic 8-bit synchronous counter design using JK flip-flops and AND gates. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/DigitalLogic/SyncJKCounter">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/DigitalLogic/SyncJKCounter"><img src="http://leap.tardate.com/Electronics101/DigitalLogic/SyncJKCounter/assets/SyncJKCounter_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/06/leap320-synchronous-jk-counter.html Tue Jun 13 2017 06:58:44 GMT-0400 (EDT) Where in the World is DBA Goth Girl- Week 24 http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/ <div id="tweetbutton6826" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fdbakevlar.com%2F2017%2F06%2Fworld-dba-goth-girl-week-24%2F&amp;text=RT%20%40DBAKevlar%20%40DBAKevlar%20%3A&amp;related=DBAKevlar:DBA+Kevlar&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdbakevlar.com%2F2017%2F06%2Fworld-dba-goth-girl-week-24%2F" class="twitter-share-button" style="width:55px;height:22px;background:transparent url('http://dbakevlar.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat 0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><div class="pf-content"><p>I just returned from a week in Paris and it was fantastic!</p> <p><a href="http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/paris/" rel="attachment wp-att-6827"><img class="alignnone wp-image-6827" src="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/06/paris.gif?resize=421%2C265" alt="" data-recalc-dims="1" /></a></p> <p>No amount of terrorist attack could hinder my enthusiasm for the week of vacation and although Tim and I were unaware a man with a hammer at Notre Dame would garner so much attention from the news outlets, I realized quick enough that I was in a slew of <a href="http://dailyglobewatch.eu/index.php?url=2017/06/terror-terror-attack-foiled-in-paris-as-police-shoot-assailant.html">online</a>, <a href="https://www.youtube.com/watch?v=wES7wN6XoAU">video</a> and <a href="http://www.denverpost.com/2017/06/07/notre-dame-attack-westminster-woman-witness/">print</a> as the major American tourist who witnessed&#8230;well, a person lying wounded on the pavement with police over him, guns drawn.  I also became quickly alerted that there was a massive crowd coming towards me looking for shelter from any further gun shots in the cathedral, (which I was currently first in line!)  We were ushered inside immediately and I have to say, I can&#8217;t think of a more beautiful place to be held while a terror attack investigation was going on outside.</p> <p>I&#8217;d tweeted just before entering the courtyard and then the line to enter the cathedral that we were going to visit Notre Dame and after being ushered in by security, some of my followers on Twitter alerted me that there was something going on, but they weren&#8217;t sure what.  I quickly responded that it was alright and that we were being protected inside the cathedral.  This ended up alerting the major media outlets and they started to contact me.  We had about 2 hours inside, so I did grant BBC and AP the time to tell them that the situation was very well contained and that we were safe.  I was hoping to keep it from being blown out of proportion, to be honest.</p> <p>Needless to say, after the initial investigation was completed and we were released, Tim and I went to get a glass of red wine, (I commonly don&#8217;t drink wine) to calm the nerves and as I&#8217;ve stated in my interviews- the French police had everything incredibly under control and contained the situation in an efficient and orderly manner.  I applaud how effectively they&#8217;ve handled the escalated terrorism threats in France and I wish other countries were as prepared as they are.</p> <p>The rest of the week we enjoyed Paris and even spent a day down on the Southern coast of France.  The last evening, just days after the terrorist event, <a href="https://twitter.com/DBAKevlar/status/873454174528253953">you could see </a>that no one was getting the French down, definitely not some silly terrorist!</p> <p>So, back to work for me!  I have two webinars this week!</p> <p>Tomorrow is an Oracle one from Pro Huddle, focused on <a href="http://www.prohuddle.com/webinars/KellynPotVinGorman/DevOps-and-the-Agile-DBA.php">DevOps for the DBA</a>!</p> <p>Wednesday is for the SQL Server VirtualPass folks and is on <a href="https://register.gotowebinar.com/register/1387790764823648002">Virtualization, Opportunities When Migrating to the Cloud</a>!</p> <p>&nbsp;</p> <p><a href="http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/louvre_image/" rel="attachment wp-att-6828"><img class="alignnone size-large wp-image-6828" src="https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/06/louvre_image.jpg?resize=600%2C450" alt="" srcset="https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/06/louvre_image.jpg?resize=1024%2C768 1024w, https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/06/louvre_image.jpg?resize=300%2C225 300w, https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/06/louvre_image.jpg?resize=768%2C576 768w, https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/06/louvre_image.jpg?w=1200 1200w, https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/06/louvre_image.jpg?w=1800 1800w" sizes="(max-width: 600px) 100vw, 600px" data-recalc-dims="1" /></a></p> <p>&nbsp;</p> <p>&nbsp;</p> <!-- Easy Plugin for AdSense Unfiltered [count: 3 is not less than 3] --></div><br><br><img src="https://i2.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/ico-tag.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> Tags:&nbsp;&nbsp;<a href="http://dbakevlar.com/tag/news/" rel="tag">News</a>, <a href="http://dbakevlar.com/tag/notre-dame-cathedral/" rel="tag">Notre Dame Cathedral</a>, <a href="http://dbakevlar.com/tag/terrorist-attack/" rel="tag">Terrorist Attack</a>, <a href="http://dbakevlar.com/tag/webinars/" rel="tag">Webinars</a><br><br><div style="width:100%"><table align="left" width="100%" cellspacing="0" cellpadding="0" bgcolor="#f1f1f1" border="0px;"> <tbody> <tr bgcolor="#ffffff"><td align="center" width="17%" valign="top"> <span class="sb_title">Del.icio.us</span><br> <a href="http://del.icio.us/post?url=http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/&title=Where in the World is DBA Goth Girl- Week 24"> <img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/delicious.gif?w=600" border="0" align="absmiddle" data-recalc-dims="1"> </a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">Facebook</span><br> <a href="http://www.facebook.com/share.php?u=http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/"><img src="https://i0.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/facebook_icon.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">TweetThis</span><br> <a href="http://twitthis.com/twit?url=http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/&title=Where in the World is DBA Goth Girl- Week 24"><img src="https://i2.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tweet.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">Digg</span><br> <a href="http://digg.com/submit?phase=2&url=http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/&title=Where in the World is DBA Goth Girl- Week 24"><img src="https://i0.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/digg.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">StumbleUpon</span><br> <a href="http://www.stumbleupon.com/submit?url=http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/&title=Where in the World is DBA Goth Girl- Week 24"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/stumble.gif?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td></tr> </tbody></table></div><br><div style="clear:both"></div><div style="background:#EEEEEE; padding:0px 0px 0px 15px; margin:10px 0px 0px 0px;"><div style="padding:5px 0px 5px 0px;"><b>Comments:</b>&nbsp;&nbsp;<a href="http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/#respond">0 (Zero), Be the first to leave a reply!</a></div><br><div style="clear:both"></div><div style="padding:13px 0px 5px 0px;"><span style="border-bottom:1px dashed #003399;padding-bottom:4px;"><strong>You might be interested in this:</strong></span>&nbsp;&nbsp;<br><ul style="margin:0; padding:0; padding-top:10px; padding-bottom:5px;"><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2011/12/solid-choices-for-oracle-tuning-on-solid-state-disk/" >Solid Choices for Oracle Tuning on Solid State Disk</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2014/06/the-new-and-improved-extensibility-exchange-is-here/" >The *New and Improved* Extensibility Exchange is Here!</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2009/12/ora-14097-column-type-or-size-mismatch-in-alter-table-exchange-partition/" >ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2016/03/hotsos-symposium-and-ioug-collaborate-2016/" >HotSos Symposium and IOUG Collaborate 2016</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2014/06/why-go-to-oracle/" >Why Go To Oracle?</a></li></ul></div></div><hr style="color:#EBEBEB" /><small>Copyright © <a href="http://dbakevlar.com">DBA Kevlar</a> [<a href="http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/">Where in the World is DBA Goth Girl- Week 24</a>], All Right Reserved. 2017.</small><br><p>The post <a rel="nofollow" href="http://dbakevlar.com/2017/06/world-dba-goth-girl-week-24/">Where in the World is DBA Goth Girl- Week 24</a> appeared first on <a rel="nofollow" href="http://dbakevlar.com">DBA Kevlar</a>.</p> dbakevlar http://dbakevlar.com/?p=6826 Mon Jun 12 2017 17:00:14 GMT-0400 (EDT) ETL using Oracle DBMS_HS_PASSTHROUGH and SQL Server https://technology.amis.nl/2017/06/12/etl-using-oracle-dbms_hs_passthrough-sql-server/ <p>While I prefer a &#8220;<em>loosely coupled architecture</em>&#8221; for replication between Oracle and SQL Server, sometimes a direct (database) link cannot be avoided. By using DBMS_HS_PASSTHROUGH for data extraction the 2 other ETL processes (transformation and load) can be configured and administered with more flexibility, providing an almost acceptable level of &#8220;<em>loosely coupled processing</em>&#8220;.<br /> Consider this as a really simple ETL config:</p> <ul><em><strong>Extract</strong></em>: Select SQL Server data with native sql, using DBMS_PASSTHROUGH and a PIPELINED function.</ul> <ul><em><strong>Transform</strong></em>: Define a view on top of the function and transform column_names and column datatypes correctly.</ul> <ul><em><strong>Load</strong></em>: SQL> insert into oracle_table select * from oracle_view;</ul> <p>When you use DBMS_HS_PASSTHROUGH Oracle doesn&#8217;t interpret the data you receive from SQL Server. By default this is done by the dg4odbc process, and the performance benefit in bypassing this process is considerable. Also, you&#8217;re not restricted by the limitations of dg4odbc and can transform the data into anything you need.</p> <p>Like dg4odbc DBMS_HS_PASSTHROUGH depends on Heterogeneous Services (a component built-in to Oracle) to provide the connectivity between Oracle and SQL Server. Installation of unixODBC and a freeTDS driver on Linux is required to setup the SQL Server datasource&#8230; installation and configuration steps can be found <a href="https://oracle-base.com/articles/misc/heterogeneous-services-generic-connectivity">here</a> and <a href="https://oracle-base.com/articles/linux/create-an-odbc-dsn-on-linux">here</a>. DBMS_HS_PASSTHROUGH is invoked through an Oracle database link. The package conceptually resides at SQL Server but, in reality, calls to this package are intercepted and mapped to one or more Heterogeneous Services calls. The freeTDS driver, in turn, maps these calls to the API of SQL Server. More about DBMS_HS_PASSTHROUGH <a href="https://docs.oracle.com/database/121/ARPLS/d_hspass.htm#ARPLS017">here</a>.</p> <p>Next a short example of how to setup data extraction from SQL Server with DBMS_HS_PASSTHROUGH and data transformation within the definition of a view. In this example the SQL Server column names differ from the ones in Oracle in case, length and/or in name and/or in datatype, and are transformed by the view. NLS_DATE_FORMAT synchronization is an exception&#8230; it&#8217;s done in the extract package itself. Reason is that all dates in this particular SQL Server database use a specific format, and it doesn&#8217;t really obscure the code. But if you choose to refrain from all transformation code in the extract package, you could create types with VARCHAR2&#8217;s only, and put all your to_number, to_date and to_timestamp conversion code in the view definition.</p> <p><strong><strong>Extract</strong></strong></p> <pre class="brush: plain; title: ; notranslate"> -- create Oracle types for uninterpreted SQL Server data CREATE OR REPLACE TYPE E01_REC AS OBJECT( C01 NUMBER(8), C02 VARCHAR2(25 CHAR), C03 VARCHAR2(3 CHAR), C04 NUMBER(8), C05 DATE, C06 DATE ); / CREATE OR REPLACE TYPE E01_TAB AS TABLE OF E01_REC; / -- create the extract package CREATE OR REPLACE PACKAGE E AUTHID DEFINER AS --------------------------------------------------------- FUNCTION E01 RETURN E01_TAB PIPELINED; --------------------------------------------------------- END E; / -- create the extract package body CREATE OR REPLACE PACKAGE BODY E AS v_cursor BINARY_INTEGER; v_out_e01 E01_REC:=E01_REC(NULL,NULL,NULL,NULL,NULL,NULL); ------------------------------------------------------------------------- v_stat_e01 VARCHAR2(100):= 'Select SiteID , SiteName , SiteMnemonic , PointRefNumber , OpeningDate , ClosingDate From ObjSite'; ------------------------------------------------------------------------- FUNCTION E01 RETURN E01_TAB PIPELINED IS BEGIN execute immediate 'alter session set NLS_DATE_FORMAT = ''YYYY-MM-DD HH24:MI:SS'' '; v_cursor := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@&lt;DBLINK&gt;; DBMS_HS_PASSTHROUGH.PARSE@&lt;DBLINK&gt;(v_cursor,v_stat_e01); WHILE DBMS_HS_PASSTHROUGH.FETCH_ROW@&lt;DBLINK&gt;(v_cursor) &gt; 0 LOOP DBMS_HS_PASSTHROUGH.GET_VALUE@&lt;DBLINK&gt;(v_cursor,1,v_out_e01.c01); DBMS_HS_PASSTHROUGH.GET_VALUE@&lt;DBLINK&gt;(v_cursor,2,v_out_e01.c02); DBMS_HS_PASSTHROUGH.GET_VALUE@&lt;DBLINK&gt;(v_cursor,3,v_out_e01.c03); DBMS_HS_PASSTHROUGH.GET_VALUE@&lt;DBLINK&gt;(v_cursor,4,v_out_e01.c04); DBMS_HS_PASSTHROUGH.GET_VALUE@&lt;DBLINK&gt;(v_cursor,5,v_out_e01.c05); DBMS_HS_PASSTHROUGH.GET_VALUE@&lt;DBLINK&gt;(v_cursor,6,v_out_e01.c06); PIPE ROW(v_out_e01); END LOOP; DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@&lt;DBLINK&gt;(v_cursor); RETURN; EXCEPTION WHEN NO_DATA_NEEDED THEN DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@&lt;DBLINK&gt;(v_cursor); WHEN OTHERS THEN DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@&lt;DBLINK&gt;(v_cursor); DBMS_OUTPUT.PUT_LINE(SQLERRM||'--'||DBMS_UTILITY.FORMAT_ERROR_BACKTRACE); RAISE; END E01; ------------------------------------------------------------------------ END E; / </pre> <p><strong><strong>Transform</strong></strong></p> <pre class="brush: plain; title: ; notranslate"> CREATE OR REPLACE FORCE VIEW SITE_VW AS SELECT TO_NUMBER(C01) SITEID, C02 STATIONNAME, C03 SITEMNEMONIC, TO_NUMBER(C04) STATIONID, C05 OPENINGDATE, C06 CLOSINGDATE FROM TABLE(E.E01); </pre> <p><strong><strong>Load</strong></strong></p> <pre class="brush: plain; title: ; notranslate"> INSERT INTO SITE SELECT * FROM SITE_VW; COMMIT; </pre> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/06/12/etl-using-oracle-dbms_hs_passthrough-sql-server/">ETL using Oracle DBMS_HS_PASSTHROUGH and SQL Server</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Harry Dragstra https://technology.amis.nl/?p=45099 Mon Jun 12 2017 11:04:46 GMT-0400 (EDT) How to get, use, and close a DB connection using callbacks https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-callbacks/ <p>Callback functions have been around since the early days of JavaScript, but there have never been any standards for using them. How should callbacks be passed into async APIs? How should errors that occur during async processing be handled? A lack of standards led to variations in API implementations.<br /> <span id="more-1997"></span><br /> The developers of Node.js decided that some basic rules for callbacks would be good for consistency. Today, the Node.js callback pattern is the canonical pattern used for async APIs (though some EventEmitter based APIs exist as well). Because the pattern is so simple, it&#8217;s very easy to learn and put to use. But, as we&#8217;ll see, the pattern alone isn&#8217;t perfect for every situation.</p> <div class="alert alert-info" role="alert"> <strong>Please Note:</strong> This post is part of <a href="https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-various-async-patterns/">a series on working with database connections using various asynchronous patterns</a>. See that post for more details and links to other options. </div> <h4>Callback pattern overview</h4> <p>The callback pattern in Node.js follows two basic rules:</p> <ol> <li>When an asynchronous API is invoked, the callback function will be the last parameter passed in.</li> <li>When the callback function is invoked, the first parameter is reserved for an error that may have occurred. The value will be <span class="inline-code">null</span> (falsy) if no error occurred and an instance of <span class="inline-code">Error</span> (truthy) if an error did occur.</li> </ol> <p>Here&#8217;s a fictitious example that demonstrates the callback pattern:</p> <pre class="crayon-plain-tag">const asyncFunc = require('asyncFunc'); function myCallback(err, value) { if (err) { // handle error return; // Returning here is important! } // Do something with value } asyncFunc('foo', 42, myCallback);</pre> <p>This is what&#8217;s happening in the script above:</p> <ul> <li>Line 1: A fake async API is required in. This API is a function that implements the Node.js callback pattern.</li> <li>Lines 3-10: A function named <span class="inline-code">myCallback</span> is declared. The first formal parameter is reserved for errors that may occur when the async work is running (rule #2 above). The return statement on line 6 is used to exit the function after the error is handled.</li> <li>Line 12: The <span class="inline-code">asyncFunc</span> function is invoked. The last parameter passed in is a reference to the callback function (rule #1 above). When the async work is done, the callback will be added to the callback queue and eventually executed on the main thread.</li> </ul> <div class="alert alert-warning" role="alert"> <strong>Remember:</strong> If an error has occurred, it&#8217;s important to exit the function after handling the error. With this pattern, that responsibility falls on you. </div> <p>As you can see, this is a pretty simple pattern and it works great for simple, sequential async flows. But, in addition to forgetting to exit after error handling logic, there are a couple of other issues that might trip up newcomers to Node.js. </p> <h4>Callback hell</h4> <p>Callback hell (a.k.a. the pyramid of doom) is something of a right of passage with Node.js. You start by writing one async call using an anonymous callback. Then you embed another async call, and then another, and you continue doing this until even you can&#8217;t make sense of the code anymore.</p> <p>The following script, which writes a file, is a not-so-bad example of callback hell:</p> <pre class="crayon-plain-tag">const fs = require('fs'); fs.open('test.txt', 'a+', function(err, fd) { if (err) { throw err; } fs.write(fd, 'test line', function(err, written, string) { if (err) { throw err; } fs.close(fd, function (err) { if (err) { throw err; // The top of the pyramid! } }); }); });</pre> <p>Do you see how each async call is indented to help keep the code readable? To some, the whitespace that builds up to the innermost async call looks like a horizontal pyramid (I used 4 spaces for indentation over 2 to make this effect more obvious). Welcome to the pyramid of doom! <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Thankfully, the solution to this problem is simple: use named functions over anonymous functions! Here&#8217;s the same basic logic, rewritten using named functions.</p> <pre class="crayon-plain-tag">const fs = require('fs'); function openFile() { fs.open('test.txt', 'a+', function(err, fd) { if (err) { throw err; } writeFile(fd); }); } function writeFile(fd) { fs.write(fd, 'test line', function(err, written, string) { if (err) { throw err; } closeFile(fd); }); } function closeFile(fd) { fs.close(fd, function (err) { if (err) { throw err; } }); } openFile();</pre> <p>Okay, so there are more lines of code in this version. But in the real world, using named functions leads to code that&#8217;s more readable, maintainable, composable, etc. Plus, we can limit the level of indentation, thus avoiding callback hell!</p> <p>However, there are still situations where the callback pattern alone isn&#8217;t enough.</p> <h4>Callback pattern limitations</h4> <p>While the callback pattern is easy to use, there are lots of asynchronous workflows that it doesn&#8217;t help with out-of-the-box. Here are some examples:</p> <ul> <li>You need to run multiple asynchronous functions concurrently, then run a different function when the concurrent functions have finished.</li> <li>You need a queue that can run n number of functions concurrently.</li> <li>You have an array of &#8220;things&#8221; that needed to be processed asynchronously (either serially or in parallel), then run another function after all elements in the array have been processed.</li> </ul> <p>Although the sample application in this series doesn&#8217;t do anything this complex, these types of flows are quite common. All of the tools you need to write such flows using just callbacks are available to you in JavaScript, but writing the algorithms may not be so easy and the resulting code may not be easy to maintain &#8211; especially for folks that are new to Node.js.</p> <p>You might start writing a library to abstract away some of the complexity involved with such async flows. If you spent a lot of time building out such a library, you&#8217;d eventually have something that looks a lot like <a href="http://caolan.github.io/async/#">Async</a>, one of the most popular libraries in the history of Node.js. We&#8217;ll cover Async in the <a href="https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-the-async-module/">next post</a> in this series. For now, let&#8217;s stick to the callback pattern and see how it can be used to code the demo application.</p> <h4>Callback demo app</h4> <p>The callback demo app is comprised of the following four files. The files are also available via <a href="https://gist.github.com/dmcghan/9f09d931637df16baa634eebef55feed">this Gist</a>.</p> <pre class="crayon-plain-tag">{ &quot;name&quot;: &quot;callbacks&quot;, &quot;version&quot;: &quot;1.0.0&quot;, &quot;description&quot;: &quot;&quot;, &quot;main&quot;: &quot;index.js&quot;, &quot;scripts&quot;: { &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot; }, &quot;keywords&quot;: [], &quot;author&quot;: &quot;Dan McGhan &lt;dan.mcghan@oracle.com&gt; (https://jsao.io/)&quot;, &quot;license&quot;: &quot;ISC&quot;, &quot;dependencies&quot;: { &quot;oracledb&quot;: &quot;^1.13.1&quot; } }</pre> <p>This is a very basic <span class="inline-code">package.json</span> file. The only external dependency is oracledb.</p> <pre class="crayon-plain-tag">const oracledb = require('oracledb'); const dbConfig = require('./db-config.js'); const employees = require('./employees.js'); oracledb.createPool(dbConfig, function(err) { if (err) { console.log(err); return; } employees.getEmployee(101, function(err, emp) { if (err) { console.log(err); return; } console.log(emp); }); });</pre> <p>In this version of the <span class="inline-code">index.js</span>, the Node.js callback pattern is used to first create a connection pool and then to fetch an employee. Although the pool is passed to the callback function for createPool, it&#8217;s not referenced here as the <a href="https://github.com/oracle/node-oracledb/blob/master/doc/api.md#-831-connection-pool-cache">built-in pool cache</a> will be used in <span class="inline-code">employees.js</span>.</p> <pre class="crayon-plain-tag">module.exports = { user: 'hr', password: 'oracle', connectString: '192.168.56.101:1521/orcl', poolMax: 20, poolMin: 20, poolIncrement: 0 };</pre> <p>The <span class="inline-code">db-config.js</span> file is used in <span class="inline-code">index.js</span> to provide the connection info for the database. This configuration should work with <a href="https://jsao.io/2017/05/creating-a-sandbox-for-learning-nodejs-and-oracle-database/">the DB App Dev VM</a>, but it will need to be adjusted for other environments.</p> <pre class="crayon-plain-tag">const oracledb = require('oracledb'); function getEmployee(empId, getEmployeeCallback) { oracledb.getConnection(function(err, conn) { if (err) { console.log('Error getting connection', err); getEmployeeCallback(err); return; } console.log('Connected to database'); conn.execute( `select * from employees where employee_id = :emp_id`, [empId], { outFormat: oracledb.OBJECT }, function(err, result) { if (err) { console.log('Error executing query', err); getEmployeeCallback(err); conn.close(function(err) { if (err) { console.log('Error closing connection', err); } else { console.log('Connection closed'); } }); return; } console.log('Query executed'); getEmployeeCallback(null, result.rows[0]); conn.close(function(err) { if (err) { console.log('Error closing connection', err); } else { console.log('Connection closed'); } }); } ); }); } module.exports.getEmployee = getEmployee;</pre> <p>This version of the <span class="inline-code">employees.js</span> file uses the Node.js callback pattern o get a connection, use it to execute a query, and then close the connection. Notice that the logic to close the connection, the &#8220;finally&#8221; in the <span class="inline-code">try&#8230;catch&#8230;finally</span> block, appears twice: once if an error occurs during the call to <span class="inline-code">connection.execute</span> and again if everything completes without error. The code could be refactored so that the &#8220;close&#8221; logic is only defined once, but it would still need to be called from these two locations.</p> <p>The Node.js callback pattern is important to understand when working with Node.js. It&#8217;s simple but effective. Hopefully, you now have a better understanding of how it works. Check out the <a href="https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-the-async-module/">next part of the series</a> to see how to use the Async module to do the same work.</p> danmcghan https://jsao.io/?p=1997 Mon Jun 12 2017 08:57:21 GMT-0400 (EDT) How to get, use, and close a DB connection using various async patterns https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-various-async-patterns/ <p>It seems simple enough: get a connection to the database, use it to do some work, then close it when you&#8217;re done. But due to the asynchronous nature of Node.js, coding this sequence isn&#8217;t as straightforward as it seems. There are lots of options for writing asynchronous code with Node.js, and each one requires the sequence to be coded differently. In this series, I&#8217;ll provide some examples that demonstrate how to get, use, and close a connection using various async patterns.<br /> <span id="more-1958"></span><br /> In this parent post, I&#8217;ll provide a little context on how async programming varies from traditional programming. The details of how a particular async pattern is used will be covered in its post (see the <a href="#async-pattern-links">links at the bottom</a>).</p> <p>Here&#8217;s an overview of what&#8217;s covered this post:</p> <ul> <li><a href="#try-catch-finally">try&#8230;catch&#8230;finally</a></li> <li><a href="#asynchronous-evented-processing">Asynchronous/evented processing</a></li> <li><a href="#functions-are-first-class">Functions are first-class</a></li> <li><a href="#functions-provide-closure">Functions provide closure</a></li> <li><a href="#common-asynchronous-patterns">Common asynchronous patterns</a></li> </ul> <h4 id="try-catch-finally">try&#8230;catch&#8230;finally</h4> <p>JavaScript has a <span class="inline-code"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch">try&#8230;catch&#8230;finally</a></span> statement. The <span class="inline-code">try&#8230;catch</span> part is easy: run some code and catch exceptions so they can be handled gracefully. But why do we need <span class="inline-code">finally</span>? <span class="inline-code">finally</span> provides a way of running cleanup code, regardless of whether an exception is raised in the try or catch blocks. Typical cleanup code includes closing file handles and database connections.</p> <p>Here&#8217;s an example:</p><pre class="crayon-plain-tag">try { console.log('try 1'); throw new Error('foo'); console.log('try 2'); } catch (err) { console.log('catch 1', err); throw new Error('bar'); console.log('catch 2'); } finally { console.log('finally!'); }</pre><p> If you run that in your browser console (or in Node.js), you should see something like this in the console:</p><pre class="crayon-plain-tag">try 1 catch 1 Error: foo at &lt;anonymous&gt;:3:9 finally! Uncaught Error: bar at &lt;anonymous&gt;:7:9</pre><p> Notice that the &#8220;bar&#8221; exception raised in the catch block does eventually bubble up as an unhandled exception, but not before the <span class="inline-code">finally</span> block is executed.</p> <p>If all of the code we ran in Node.js were synchronous, we&#8217;d be able to do something like this:</p><pre class="crayon-plain-tag">try { // get a connection to the DB // use the connection to do work } catch (error) { // handle the error } finally { // close the connection }</pre><p> Unfortunately, <span class="inline-code">try&#8230;catch&#8230;finally</span> isn&#8217;t very useful with asynchronous code &#8211; at least not until <span class="inline-code"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function">async/await</a></span> functions are available to you. The reason has to do with the way async work is done in Node.js. </p> <h4 id="asynchronous-evented-processing">Asynchronous/evented processing</h4> <p>Here&#8217;s an overview of how asynchronous operations, such as making HTTP requests and executing database queries, are performed.</p> <p><a href="https://jsao.io/wp-content/uploads/2017/05/async-processing-nodejs.png" rel="prettyPhoto[gallery-Wc98]"><img src="https://jsao.io/wp-content/uploads/2017/05/async-processing-nodejs.png" alt="" width="800" height="481" class="alignnone size-full wp-image-1983" /></a></p> <p>As you can see, asynchronous APIs are invoked from the main thread and passed callback functions. Depending on the type, the async work may be completely evented, or it might leverage a thread pool. When the async work is complete, the callback function is added to the callback queue to be invoked on the main thread as soon as possible. </p> <p>With this architecture, errors that occurred during the async processing are brought back to the main thread in an entirely different call stack. You can&#8217;t catch errors raised in a different call stack &#8211; it&#8217;s too late!</p> <p>Here&#8217;s a very simple demo of invoking an async API:</p> <pre class="crayon-plain-tag">setTimeout(function() { console.log('hello'); }, 2000); console.log('world');</pre> <p>If you run that script in a browser console or Node.js, the output will be:</p><pre class="crayon-plain-tag">world hello</pre><p> Seeing &#8220;world&#8221; before &#8220;hello&#8221; can surprise folks new to async programming. The secret sauce that makes it work is the callback function passed to <span class="inline-code">setTimeout</span>. It will &#8220;call back&#8221;, or be executed on the main thread, when the specified time has passed. </p> <p>Callback functions can be traced back to the beginnings of JavaScript, which was designed as a language to bring life to the web. JavaScript developers needed a means of associating code with events such as the loading of a page, click of a mouse, or press of a key on a keyboard. Over time, DOM APIs such as the following were introduced.<br /> <!--more--></p><pre class="crayon-plain-tag">window.addEventListener('load', function() { // do some work });</pre><p> The <span class="inline-code">addEventListener</span> method above takes the anonymous function passed in as the second parameter and adds it to a list of listeners related to the <span class="inline-code">load</span> event on the <span class="inline-code">window</span> element. When the event occurs, all listeners are added to the callback queue and will be invoked as soon as possible.</p> <p>For callbacks to work properly, functions in JavaScript needed some important features: they needed to be first-class objects and they needed closure.</p> <h4 id="functions-are-first-class">Functions are first-class</h4> <p>The concept of functions as first-class objects sounds more complex than it is. Most programming languages provide a means of declaring variables and creating named units of code, often called functions or procedures. There&#8217;s usually a clear distinction between these two constructs. For example, you can declare variables and pass them into functions, but you can&#8217;t pass a function into a function.</p> <p>JavaScript, on the other hand, allows functions to be used more like standard data types such as Number, String, and Boolean. Functions can be declared, passed around from function to function, and invoked at some point in the future. Treating functions as first-class objects is a prerequisite for passing a callback function into another function, but the feature can aid with code organization too.</p> <p>Imagine you wanted to execute the same code when a page is loaded <em>and</em> when a user clicks the window. You could do something like this:</p> <pre class="crayon-plain-tag">window.addEventListener('load', function() { // do some work }); window.addEventListener('click', function() { // do the same work here });</pre> <p>The problem with the code above is that we have to maintain two functions that do the same work. However, knowing that functions are first-class objects, we could declare a single, named function and pass a reference to it as needed:</p> <pre class="crayon-plain-tag">function doWork() { // do some work } window.addEventListener('load', doWork); window.addEventListener('click', doWork);</pre> <p>As you can see, functions as first-class objects is a simple but powerful feature of JavaScript.</p> <h4 id="functions-provide-closure">Functions provide closure</h4> <p>The concept of a closure is probably a bit harder to wrap one&#8217;s head around at first &#8211; but it&#8217;s crucial for async/evented programming. Put simply, a closure is a function that refers to variables defined in its enclosing scope.</p> <p>Many languages allow developers to nest functions within functions and child functions can refer to variables declared in the parent function&#8217;s scope. Developers using other languages may <em>never</em> wonder, &#8220;What would happen if the run-time invoked a child function after the parent function finished executing?&#8221; It&#8217;s simply not possible. But that&#8217;s not the case with JavaScript!</p> <p>Remember that functions in JavaScript are first-class objects, so like any other value assigned to a variable, they can escape the confines of their parent function by being passed around. When this happens, the references to variables in the original enclosing scope (lexical scope) will still exist. So what should happen when the child function is invoked in the future?</p> <p>Closure ensures that the child function will be able to access those variables as long as run-time may need to invoke the child function. Such variables will not be garbage collected as they normally would be.</p> <p>Here&#8217;s an example of a closure:</p> <pre class="crayon-plain-tag">&lt;html&gt; &lt;body&gt; &lt;button id=&quot;my-button&quot;&gt;Click me!&lt;/button&gt; &lt;script&gt; function onLoad() { // &quot;onLoad&quot; is the parent function. var button = document.getElementById('my-button'); function onClick() { // &quot;onClick&quot; is the child function (closure). button.parentNode.removeChild(button); // &quot;button&quot; referes to the enslosing scope. } // &quot;onClick&quot; can be invoked after &quot;onLoad&quot; finishes but the reference to &quot;button&quot; // will still be valid thanks to closure. button.addEventListener('click', onClick); } window.addEventListener('load', onLoad); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p>You can copy and paste this code into a file with a .html extension and open it in a browser. You should see a button that says &#8220;Click me!&#8221;. When the window loads, the <span class="inline-code">onLoad</span> function registers the <span class="inline-code">onClick</span> function with the <span class="inline-code">click</span> event on the button.</p> <p>Note that <span class="inline-code">onClick</span> was not invoked within <span class="inline-code">onLoad</span>. Instead, a reference was passed to an API that can invoke the function in the future. Because <span class="inline-code">onClick</span> refers to the <span class="inline-code">button</span> variable declared in the <span class="inline-code">onLoad</span> (parent) function, closure ensures that <span class="inline-code">onClick</span> will have access to <span class="inline-code">button</span> when it&#8217;s invoked in the future.</p> <p>Now that we&#8217;ve addressed how some of the core concepts related to async programming in JavaScript, let&#8217;s turn our attention to some of the async patterns that have evolved in Node.js.</p> <h4 id="common-asynchronous-patterns">Common asynchronous patterns</h4> <p>Currently, the most common (and generic) patterns used to write asynchronous code with Node.js are callbacks, the async module, and promises. Node.js v7.6 got an update to the V8 JavaScript engine which introduced a new means of doing async processing called <span class="inline-code">async/await</span> functions.</p> <p>Building on top of the work done for generators and promises, <span class="inline-code">async/await</span> functions allow JavaScript code to be written syncronously while it executes asynchronously. Best of all, synchronous constructs such as loops and <span class="inline-code">try&#8230;catch&#8230;finally</span> work as you&#8217;d expect them to! <span class="inline-code">async/await</span> is a serious game changer for JavaScript, but knowledge of promises, and thus async processing in general, will still be important.</p> <p>Each pattern we&#8217;ll be exploring will have a dedicated post. Each post will explain the basics of the pattern and provide a demo app that uses the pattern. The demo apps will perform the same three async operations: get a connection to the database, use it to execute a simple query, then close the connection.</p> <p>To run a demo app locally, assuming Node.js and the <a href="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md">OCI client libraries</a> are already installed, just <a href="https://help.github.com/articles/forking-and-cloning-gists/">clone the related Gist</a> or create the various files in a directory. Then open the directory in a terminal and run <span class="inline-code">npm install</span> followed by <span class="inline-code">node index.js</span>.</p> <div class="alert alert-info" role="alert"> <strong>Tip:</strong> See <a href="https://jsao.io/2017/05/creating-a-sandbox-for-learning-nodejs-and-oracle-database/">this post</a> if you&#8217;d like to set up a local sandbox for working through the examples. </div> <p id="async-pattern-links">Here are the links for each pattern (links will become active as posts are published):</p> <ul style="margin-bottom: 0"> <li><a href="https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-callbacks/">Callbacks</a></li> <li><a href="https://jsao.io/2017/06/how-to-get-use-and-close-a-db-connection-using-the-async-module/">Async module</a></li> <li>Promises</li> <li>Async/await functions</li> </ul> danmcghan https://jsao.io/?p=1958 Mon Jun 12 2017 08:54:41 GMT-0400 (EDT) LEAP#319 Digital Logic Clock http://blog.tardate.com/2017/06/leap319-digital-logic-clock.html <p>This digital clock module was <a href="https://www.youtube.com/watch?v=SmQ5K7UQPMM">designed by Ben Eater</a> as part of his 8-bit computer build. It is also an interesting demonstration of the 555 timer in all its major modes of operation. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/555Timer/DigitalLogicClock">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/555Timer/DigitalLogicClock"><img src="http://leap.tardate.com/Electronics101/555Timer/DigitalLogicClock/assets/DigitalLogicClock_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/06/leap319-digital-logic-clock.html Mon Jun 12 2017 08:10:19 GMT-0400 (EDT) dbms_sqldiag https://jonathanlewis.wordpress.com/2017/06/12/dbms_sqldiag/ <p>If you&#8217;re familiar with SQL Profiles and SQL Baselines you may also know about SQL Patches &#8211; a feature that allows you to construct hints that you can attach to SQL statements at run-time without changing the code. Oracle 12c Release 2 introduces a couple of important changes to this feature:</p> <ul> <li>It&#8217;s now official &#8211; the feature had been copied from package <em><strong>dbms_sqldiag_internal</strong></em> to package <em><strong>dbms_sqldiag</strong></em>.</li> <li>The limitation of 500 characters has been removed from the hint text &#8211; it&#8217;s now a CLOB column.</li> </ul> <p>H/T to <a href="https://blogs.oracle.com/optimizer/b19a7465-ac9c-4585-9559-d12e8f791263"><em><strong>Nigel Bayliss</strong></em></a> for including this detail in his presentation to the UKOUG last week, and pointing out that it&#8217;s also available for Standard Edition.</p> <p>There are a couple of other little changes as you can see below from the two extract from the 12.2 declarations of <em><strong>dbms_sqldiag</strong></em> and <em><strong>dbms_sqldiag_internal</strong></em> below:</p> <pre class="brush: plain; title: ; notranslate"> dbms_sqldiag ------------ FUNCTION CREATE_SQL_PATCH RETURNS VARCHAR2 Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- SQL_TEXT CLOB IN HINT_TEXT CLOB IN NAME VARCHAR2 IN DEFAULT DESCRIPTION VARCHAR2 IN DEFAULT CATEGORY VARCHAR2 IN DEFAULT VALIDATE BOOLEAN IN DEFAULT FUNCTION CREATE_SQL_PATCH RETURNS VARCHAR2 Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- SQL_ID VARCHAR2 IN HINT_TEXT CLOB IN NAME VARCHAR2 IN DEFAULT DESCRIPTION VARCHAR2 IN DEFAULT CATEGORY VARCHAR2 IN DEFAULT VALIDATE BOOLEAN IN DEFAULT dbms_sqldiag_internal --------------------- FUNCTION I_CREATE_PATCH RETURNS VARCHAR2 Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- SQL_ID VARCHAR2 IN HINT_TEXT CLOB IN CREATOR VARCHAR2 IN NAME VARCHAR2 IN DEFAULT DESCRIPTION VARCHAR2 IN DEFAULT CATEGORY VARCHAR2 IN DEFAULT VALIDATE BOOLEAN IN DEFAULT FUNCTION I_CREATE_PATCH RETURNS VARCHAR2 Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- SQL_TEXT CLOB IN HINT_TEXT CLOB IN CREATOR VARCHAR2 IN NAME VARCHAR2 IN DEFAULT DESCRIPTION VARCHAR2 IN DEFAULT CATEGORY VARCHAR2 IN DEFAULT VALIDATE BOOLEAN IN DEFAULT </pre> <ul> <li>The function names change from <strong><em>i_create_patch</em></strong> to <strong><em>create_patch</em></strong> when exposed in <em><strong>dbms_sqldiag</strong></em>.</li> <li>There are two versions of the function &#8211; one that requires you to supply the exact SQL text, and a new version that allows you to supply an SQL ID.</li> <li>The internal function also adds a <em><strong>creator</strong></em> to the existing parameter list &#8211; and it doesn&#8217;t have a default so if you&#8217;ve already got some code to use the internal version it&#8217;s not going to work on an upgrade to 12.2 until you change it.</li> </ul> <p>I was prompted to write this note by a tweet asking me if there&#8217;s any SQL available to see the contents of an SQL Profile in 11g and 12c. (I published some simple code <a href="https://jonathanlewis.wordpress.com/2007/02/12/sql-profiles-2/#comment-29407"><em><strong>several years ago for 10g</strong></em></a>, (before accepting &#8211; in the body of the blog, after accepting &#8211; in the linked comment) but Oracle changed the base tables in 11g). The answer is yes, probably on the Internet somewhere, but here&#8217;s some code I wrote a couple of years ago to report profiles in the more recent versions of Oracle:</p> <pre class="brush: plain; title: ; notranslate"> rem rem sql_profile_baseline_11g.sql rem J.P.Lewis rem July 2010 rem set pagesize 60 set linesize 132 set trimspool on column hint format a70 wrap word column signature format 999,999,999,999,999,999,999 break on signature skip 1 on opt_type skip 1 on plan_id skip 1 spool sql_profile_baseline_11g select prf.signature, decode( obj_type, 1,'Profile', 2,'Baseline', 3,'Patch', 'Other' ) opt_type, prf.plan_id, extractvalue(value(tab),'.') hint from ( select /*+ no_eliminate_oby */ * from sqlobj$data where comp_data is not null order by signature, obj_type, plan_id ) prf, table( xmlsequence( extract(xmltype(prf.comp_data),'/outline_data/hint') ) ) tab ; </pre> <p>This will report the hints associated with SQL Baselines, SQL Profiles, and SQL Patches &#8211; all three store the data in the same base table. As a minor variation I also have a query that will reported a named profile/baseline/patch, but this requires a join to the <em><strong>sqlobj$</strong></em> table. As you can see from the substitution variable near the end of the text, the script will prompt you for an object name.</p> <pre class="brush: plain; title: ; notranslate"> set pagesize 60 set linesize 180 set trimspool on column plan_name format a32 column signature format 999,999,999,999,999,999,999 column category format a10 column hint format a70 wrap word break on plan_name skip 1 on signature skip 1 on opt_type skip 1 on category skip 1 on plan_id skip 1 spool sql_profile_baseline_11g select prf.plan_name, prf.signature, decode( obj_type, 1,'Profile', 2,'Baseline', 3,'Patch', 'Other' ) opt_type, prf.category, prf.plan_id, extractvalue(value(hnt),'.') hint from ( select /*+ no_eliminate_oby */ so.name plan_name, so.signature, so.category, so.obj_type, so.plan_id, sod.comp_data from sqlobj$ so, sqlobj$data sod where so.name = '&amp;m_plan_name' and sod.signature = so.signature and sod.category = so.category and sod.obj_type = so.obj_type and sod.plan_id = so.plan_id order by signature, obj_type, plan_id ) prf, table ( select xmlsequence( extract(xmltype(prf.comp_data),'/outline_data/hint') ) from dual ) hnt ; </pre> <h3>Lagniappe:</h3> <p>One of the enhancements that appeared in 12c for SQL Baselines was that the plan the baseline was supposed to produce was stored in the database so that Oracle could check that the baseline would still reproduce the expected plan before applying it. These plans (also generated for Profiles and Patches) are stored in the table <em><strong>sqlobj$plan</strong></em>, and the <em><strong>dbms_xplan</strong></em> package has been enhanced with three new functions to report them:</p> <pre class="brush: plain; title: ; notranslate"> FUNCTION DISPLAY_SQL_PATCH_PLAN RETURNS DBMS_XPLAN_TYPE_TABLE Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- NAME VARCHAR2 IN FORMAT VARCHAR2 IN DEFAULT FUNCTION DISPLAY_SQL_PLAN_BASELINE RETURNS DBMS_XPLAN_TYPE_TABLE Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- SQL_HANDLE VARCHAR2 IN DEFAULT PLAN_NAME VARCHAR2 IN DEFAULT FORMAT VARCHAR2 IN DEFAULT FUNCTION DISPLAY_SQL_PROFILE_PLAN RETURNS DBMS_XPLAN_TYPE_TABLE Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- NAME VARCHAR2 IN FORMAT VARCHAR2 IN DEFAULT e.g. SQL&gt; select * from table(dbms_xplan.display_sql_profile_plan('SYS_SQLPROF_015c9bd3bceb0000')); PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- SQL text: select t1.id, t2.id from t1, t2 where t1.id between 10000 and 20000 and t2.n1 = t1.n1 and t2.n1 = t2.v2 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- SQL Profile Name: SYS_SQLPROF_015c9bd3bceb0000 Status: ENABLED Plan rows: From dictionary -------------------------------------------------------------------------------- Plan hash value: 3683239666 ----------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib | ----------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 10501 | 287K| 248 (4)| 00:00:01 | | | | | 1 | PX COORDINATOR | | | | 0 (0)| | | | | | 2 | PX SEND QC (RANDOM) | :TQ10002 | 10501 | 287K| 248 (4)| 00:00:01 | Q1,02 | P-&gt;S | QC (RAND) | |* 3 | HASH JOIN BUFFERED | | 10501 | 287K| 248 (4)| 00:00:01 | Q1,02 | PCWP | | | 4 | PX RECEIVE | | 10002 | 97K| 123 (3)| 00:00:01 | Q1,02 | PCWP | | | 5 | PX SEND HASH | :TQ10000 | 10002 | 97K| 123 (3)| 00:00:01 | Q1,00 | P-&gt;P | HASH | | 6 | PX BLOCK ITERATOR | | 10002 | 97K| 123 (3)| 00:00:01 | Q1,00 | PCWC | | |* 7 | TABLE ACCESS FULL| T1 | 10002 | 97K| 123 (3)| 00:00:01 | Q1,00 | PCWP | | | 8 | PX RECEIVE | | 104K| 1845K| 124 (4)| 00:00:01 | Q1,02 | PCWP | | | 9 | PX SEND HASH | :TQ10001 | 104K| 1845K| 124 (4)| 00:00:01 | Q1,01 | P-&gt;P | HASH | | 10 | PX BLOCK ITERATOR | | 104K| 1845K| 124 (4)| 00:00:01 | Q1,01 | PCWC | | |* 11 | TABLE ACCESS FULL| T2 | 104K| 1845K| 124 (4)| 00:00:01 | Q1,01 | PCWP | | ----------------------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 3 - access(&quot;T2&quot;.&quot;N1&quot;=&quot;T1&quot;.&quot;N1&quot;) 7 - filter(&quot;T1&quot;.&quot;ID&quot;&lt;=20000 AND &quot;T1&quot;.&quot;ID&quot;&gt;=10000) 11 - filter(&quot;T2&quot;.&quot;N1&quot;=TO_NUMBER(&quot;T2&quot;.&quot;V2&quot;)) Note ----- - automatic DOP: Computed Degree of Parallelism is 2 </pre> <p>Disclaimer &#8211; I&#8217;ve checked only the SQL_PROFILE function call on 12.2, after creating a profile to check that my old 11g report still worked in 12c.</p> <p>&nbsp;</p><br /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jonathanlewis.wordpress.com/17250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jonathanlewis.wordpress.com/17250/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=jonathanlewis.wordpress.com&#038;blog=491988&#038;post=17250&#038;subd=jonathanlewis&#038;ref=&#038;feed=1" width="1" height="1" /> Jonathan Lewis http://jonathanlewis.wordpress.com/?p=17250 Mon Jun 12 2017 07:48:55 GMT-0400 (EDT) KeePass 2.36 http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/pNiMY_n-Oig/ <p><img class="alignleft size-full wp-image-5429" src="https://oracle-base.com/blog/wp-content/uploads/2015/08/keepass.jpg" alt="" width="79" height="79" /><a href="http://keepass.info/news/n170609_2.36.html">KeePass 2.36</a> was released a few days ago. You can download it <a href="http://keepass.info/download.html">here</a>.</p> <p>You can read about how I use KeePass and <a href="https://www.keepassx.org/">KeePassX2</a> on my Mac, Windows and Android devices <a href="https://oracle-base.com/blog/2012/08/11/adventures-with-dropbox-and-keepass/">here</a>.</p> <p>Cheers</p> <p>Tim…</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/12/keepass-2-36/">KeePass 2.36</a> was first posted on June 12, 2017 at 9:12 am.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/pNiMY_n-Oig" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7224 Mon Jun 12 2017 04:12:13 GMT-0400 (EDT) Speaker at OTN Yathra 2017 https://gavinsoorma.com/2017/06/speaker-at-otn-yathra-2017/ <p>I am presenting the following papers at the OTN Yathra tour 2017 which will cover six cities in India &#8211; Chennai, Bangalore, Hyderabad, Pune, Mumbai and Delhi.</p> <p>&nbsp;</p> <pre><em><strong>Oracle Database Multitenant – What’s New in Oracle 12c Release 2</strong></em> Oracle Database 12c Release 2 presents several new features related to the Multitenant option which was introduced in 12c Release 1. The session introduces all the new exciting features related to Container and Pluggable databases which will include  Hot Cloning, Refreshable Pluggable Databases, Application Containers, PDB Flashback, PDB Lockdown Profiles, Performance Profiles and Proxy PDBs to name a few. <em><strong><span style="font-family: 'Courier New';">Upgrade and Migrate to Oracle Database 12c Release 2– best practices for minimizing downtime</span></strong></em> Oracle database 12.2.0.1 has been released a few months ago and introduces many exciting and ground-breaking new features. However, in many cases organizations are not able to afford the outage required for such upgrades and migrations to a new release. This session outlines the best practices which can be deployed to minimize downtime required for upgrades and discusses the pros and cons of different upgrade/migration methods and techniques like Oracle GoldenGate, Cross-platform Transportable Tablespaces, Rolling Upgrades using Transient Logical Standby Databases and Data Guard among others. Attendees will also learn how to upgrade an Oracle 12.1.0.2 Multitenant environment with Container and Pluggable databases to Oracle 12c Release 2.</pre> <pre><a href="https://gavinsoorma.com/wp-content/uploads/2017/06/otn1.png"><img class="aligncenter wp-image-7660 " src="https://gavinsoorma.com/wp-content/uploads/2017/06/otn1-203x300.png" alt="" width="500" height="739" srcset="https://gavinsoorma.com/wp-content/uploads/2017/06/otn1-203x300.png 203w, https://gavinsoorma.com/wp-content/uploads/2017/06/otn1-768x1133.png 768w, https://gavinsoorma.com/wp-content/uploads/2017/06/otn1-694x1024.png 694w" sizes="(max-width: 500px) 100vw, 500px" /></a></pre> Gavin Soorma https://gavinsoorma.com/?p=7661 Sun Jun 11 2017 00:24:29 GMT-0400 (EDT) #GoldenGate Manager Access Rules https://dbasolved.com/2017/06/10/goldengate-manager-access-rules/ <p dir="auto">Starting in Oracle GoldenGate 12.2.0.1, the manager process is more secure than in previous releases of Oracle GoldenGate. After the inital install and running of the Manager process, you may run into the following warning message upon a restart of the Oracle GoldenGate environment:</p> <pre class="brush: css; title: ; notranslate"> WARNING OGG-01877 Missing explicit accessrule for server collector. </pre> <p dir="ltr">The inital description of the error message doesn’t make much sense. Using OGGERR, you can find out more about this error message:</p> <pre class="brush: css; title: ; notranslate">$ oggerr ogg-01877 01877, 00000, &quot;Missing explicit accessrule for server collector.&quot; // *Cause: There was no explict ACCESSRULE specified for SERVER. // *Action: Only allow accessing SERVER from hosts where data pump(s) might // send trail files to this host. </pre> <p>As you can tell, the error message is pointing you to the ACCESSRULE parameter.</p> <p dir="ltr">Now that you have more detail, you know that there is a new parameter called ACCESSRULE that needs to be specificed in the manager parameter file. To find out more information on the ACCESSRULE parameter look at this <a href="http://docs.oracle.com/goldengate/c1221/gg-winux/GWURF/summary-oracle-goldengate-parameters.htm#GUID-E85B2809-0CD5-4C47-98DD-58BA0BED1FC6" target="_blank" rel="noopener">link</a>.</p> <p dir="ltr">The defnition of this parameter is:</p> <p dir="ltr"><em>&#8220;Use ACCESSRULE to control connection access to the Manager process and the processes under its control. You can establish multiple rules by specifying multiple ACCESSRULE statements in the parameter file and control their priority. To establish priority, you can either list the rules in order from most important to least important,or you can explicitly set the priority of each rule with the PRI option.&#8221; </em></p> <p dir="ltr">This parameter is not a default configured parameter for the manager process. This is something that you will need to decided on and how to control access to your environments. The syntax for this parameter is as follows:</p> <pre class="brush: css; title: ; notranslate"> ACCESSRULE[, PROG program_name][, IPADDR address][, PRI rule][, login_ID]{,ALLOW | DENY} </pre> <p>There are multiple example of how to define an access rule in the Oracle GoldenGate 12.2.0.1 documentation. The example that I’m providing here is how I resolved the warning message in my Vbox test environment.</p> <pre class="brush: css; title: ; notranslate">ACCESSRULE, PROG * ALLOW </pre> <p>With this access rule, you can now start the manager process without issue. You would be allowing access to all processes in the Oracle GoldenGate environment.</p> <p dir="ltr">Enjoy!</p> <p dir="ltr">-Bobby</p><br />Filed under: <a href='https://dbasolved.com/category/replication-2/golden-gate/'>Golden Gate</a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=dbasolved.com&#038;blog=41578630&#038;post=1633&#038;subd=curtisbl&#038;ref=&#038;feed=1" width="1" height="1" /> curtisbl http://dbasolved.com/?p=1633 Sat Jun 10 2017 23:21:01 GMT-0400 (EDT) 12.2 Partitions https://jonathanlewis.wordpress.com/2017/06/09/12-2-partitions/ <p>At the end of my presentation to the UKOUG Database SIG yesterday I summed up (most) of points I&#8217;d made with <em><strong>a slide making the claim</strong></em>:</p> <p style="padding-left:30px;"><em>In 12.2 you can: </em><em>Convert a simple table to partitioned with </em><em>multi-column automatic list partitions, </em><em>partially indexed, </em><em>with read only segments, </em><em>filtering out unwanted data, </em><em>online </em><em>in one operation.</em></p> <p>&nbsp;</p> <p>Last night I decided I ought to demonstrate the claim &#8211; so here&#8217;s a little code, first creating a simple heap table:</p> <pre class="brush: plain; title: ; notranslate"> rem rem Script: 122_features.sql rem Author: Jonathan Lewis rem Dated: June 2017 rem rem Last tested rem 12.2.0.1 rem create table t1( date_start not null, date_end not null, id not null, client_id, resort_code, uk_flag, v1, padding, constraint t1_range_ck check ((date_end - date_start) in (7, 14, 21)) ) segment creation immediate nologging as with generator as ( select rownum id from dual connect by level &lt;= 1e4 ) select trunc(sysdate,'yyyy') + 7 * mod(rownum, 8) date_start, trunc(sysdate,'yyyy') + 7 * (mod(rownum, 8) + trunc(dbms_random.value(1,4))) date_end, rownum id, trunc(dbms_random.value(1e5,2e5)) client_id, trunc(dbms_random.value(1e4,2e4)) resort_code, case when mod(rownum,275) = 0 then 1 end uk_flag, lpad(rownum,10,'0') v1, lpad('x',100,'x') padding from generator v1, generator v2 where rownum &lt;= 1e5 -- &gt; &quot;GT&quot; inserted to avoid WordPress formatting issue ; create index t1_client_idx on t1(client_id); create index t1_resort_idx on t1(resort_code); create index t1_ukflag_idx on t1(uk_flag); alter table t1 add constraint t1_pk primary key(id); </pre> <p>I&#8217;ve got a table which models a travel company that arranges holidays that last one, two, or three weeks and (for convenience) they all start on the same day for the week. So I generate a start and end date for each row, making sure the start date is a multiple of seven days from a base date while the end date is 7, 14, or 21 days later. I&#8217;ve got a few indexes on the data, and a primary key constraint. There&#8217;s a special flag column on the table for holidays in the UK, which is a small parcentage of the holidays booked.</p> <p>Eventually, when the data gets too big, I decide that I want to partition this data, and the obvious partitioning idea that springs to mind is to partition it so that holidays with the same start date and duration are all in the same partition and each partition holds a single start/duration.</p> <p>I&#8217;ve also decided that I&#8217;m going to make old data read-only, and I&#8217;m not interested in the UK holidays once they gone into history so I&#8217;m going to get rid of some of them.</p> <p>The index protecting the primary key will have to be global since it won&#8217;t contain the partition key; since the index on uk_flag covers a small amount of data I&#8217;m going to keep that global as well, but I want the other two indexes to be local &#8211; except for the older data I&#8217;m not really interested in keeping the index on client id.</p> <p>And I don&#8217;t want to stop the application while I&#8217;m restructuring the data.</p> <p>So here&#8217;s my one SQL statement:</p> <pre class="brush: plain; title: ; notranslate"> alter table t1 modify partition by list (date_start, date_end) automatic ( partition p11 values (to_date('01-Jan-2017'),to_date('08-Jan-2017')) indexing off read only, partition p12 values (to_date('01-Jan-2017'),to_date('15-Jan-2017')) indexing off read only, partition p13 values (to_date('01-Jan-2017'),to_date('22-Jan-2017')) indexing off read only, partition p21 values (to_date('08-Jan-2017'),to_date('15-Jan-2017')) indexing off read only, partition p22 values (to_date('08-Jan-2017'),to_date('22-Jan-2017')) indexing off read only, partition p23 values (to_date('08-Jan-2017'),to_date('29-Jan-2017')) indexing off read only, partition p31 values (to_date('15-Jan-2017'),to_date('22-Jan-2017')) indexing off read only, partition p32 values (to_date('15-Jan-2017'),to_date('29-Jan-2017')) indexing off read only, partition p33 values (to_date('15-Jan-2017'),to_date('05-Feb-2017')) indexing off read only ) including rows where uk_flag is null or (date_start &gt; to_date('01-feb-2017','dd-mon-yyyy')) online update indexes ( t1_client_idx local indexing partial, t1_resort_idx local, t1_ukflag_idx indexing partial ) ; </pre> <h3>Key Points</h3> <ul> <li>partition by list (date_start, date_end) &#8212; partitioned by a multi-column list</li> <li>automatic &#8212; if data arrives for which there is on existing partition a new one will be created</li> <li>indexing off &#8212; some of my partitions (the pre-defined (oldest) ones) will be subject to partial indexing</li> <li>read only &#8212; some of my partitions (the pre-defined (oldest) ones) will be made read only</li> <li>including rows where &#8212; some of my rows will disappear during copying <sup>[1]</sup></li> <li>online &#8212; Oracle will be journalling the data while I copy and apply the journey at the end</li> <li>update indexes &#8211; specify some details about indexes <sup>[2]</sup></li> <li>local &#8212; some of the rebuilt indexes will be local</li> <li>indexing partial &#8212; some of the rebuilt indexes will not hold data (viz: for the partitions declared &#8220;indexing off&#8221;)</li> </ul> <p>I&#8217;ve footnoted a couple of the entries:</p> <p>[1] &#8211; the copy is done read-consistently, so data inserted while the copy takes place will still appear in the final table, even if it looks as if it should have failed the <em><strong>including rows</strong></em> clause.</p> <p>[2] &#8211; indexes which include the partition key will automatically be created as local indexes (and you can declare them here as global, or globally partitioned, if you want to). The manual has an error on this point; it suggests that <em><strong>prefixed</strong></em> indexes will be created as local indexes but then defines <em>&#8220;prefixed&#8221;</em> to mean <em>&#8220;<strong>contains</strong> the partition key&#8221;</em> rather than the usual <em>&#8220;<strong>starts</strong> with the partition key&#8221;</em>.</p> <p>Job done &#8211; except for the exhaustive tests that it&#8217;s been done correctly, the load test to see how it behaves when lots of new holidays are being booked and current ones being modified, and a little bit of clearing up of &#8220;surprise&#8221; partitions that shouldn&#8217;t be there and changing some of the automatically generated table partitions to be <em>&#8220;indexing off&#8221;</em> (if and when necessary).</p> <p>Here are a few queries &#8211; with results &#8211; showing the effects this one statement had:</p> <pre class="brush: plain; title: ; notranslate"> select count(*) from t1; /* COUNT(*) ---------- 99773 -- some rows (old UK) have disappeared from the original 10,000 */ select index_name, partitioned, status, leaf_blocks, num_rows , indexing, orphaned_entries from user_indexes where table_name = 'T1' order by partitioned, index_name ; /* INDEX_NAME PAR STATUS LEAF_BLOCKS NUM_ROWS INDEXIN ORP -------------------- --- -------- ----------- ---------- ------- --- T1_PK NO VALID 263 99773 FULL NO T1_UKFLAG_IDX NO VALID 1 136 PARTIAL NO T1_CLIENT_IDX YES N/A 149 62409 PARTIAL NO T1_RESORT_IDX YES N/A 239 99773 FULL NO -- Indexes: Local or global, full or partial. */ select segment_type, segment_name, count(*) from user_segments group by segment_type, segment_name order by segment_type desc, segment_name ; /* SEGMENT_TYPE SEGMENT_NAME COUNT(*) ------------------ ------------------------- ---------- TABLE PARTITION T1 24 INDEX PARTITION T1_CLIENT_IDX 15 INDEX PARTITION T1_RESORT_IDX 24 INDEX T1_PK 1 INDEX T1_UKFLAG_IDX 1 -- One local index has fewer segments than the other */ set linesize 180 set trimspool on column high_value format a85 break on index_name skip 1 set pagesize 200 select index_name, status, leaf_blocks, num_rows, partition_name, high_value from user_ind_partitions where index_name = 'T1_CLIENT_IDX' -- index_name like 'T1%' order by index_name, partition_position ; /* INDEX_NAME STATUS LEAF_BLOCKS NUM_ROWS PARTITION_NAME HIGH_VALUE -------------------- -------- ----------- ---------- ---------------------- ------------------------------------------------------------------------------------- T1_CLIENT_IDX UNUSABLE 0 0 P11 ( TO_DATE(' 2017-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-01-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) UNUSABLE 0 0 P12 ( TO_DATE(' 2017-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-01-15 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) UNUSABLE 0 0 P13 ( TO_DATE(' 2017-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-01-22 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) UNUSABLE 0 0 P21 ( TO_DATE(' 2017-01-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-01-15 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) UNUSABLE 0 0 P22 ( TO_DATE(' 2017-01-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-01-22 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) UNUSABLE 0 0 P23 ( TO_DATE(' 2017-01-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-01-29 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) UNUSABLE 0 0 P31 ( TO_DATE(' 2017-01-15 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-01-22 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) UNUSABLE 0 0 P32 ( TO_DATE(' 2017-01-15 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-01-29 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) UNUSABLE 0 0 P33 ( TO_DATE(' 2017-01-15 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') , TO_DATE(' 2017-02-05 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') ) USABLE 10 4126 SYS_P1528 ( TO_DATE(' 2017-01-22 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4198 SYS_P1529 ( TO_DATE(' 2017-01-29 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-19 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4211 SYS_P1530 ( TO_DATE(' 2017-02-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-19 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4214 SYS_P1531 ( TO_DATE(' 2017-02-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-26 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4195 SYS_P1532 ( TO_DATE(' 2017-02-19 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-03-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4113 SYS_P1533 ( TO_DATE(' 2017-01-22 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-01-29 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 9 4027 SYS_P1534 ( TO_DATE(' 2017-01-29 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4217 SYS_P1535 ( TO_DATE(' 2017-02-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-19 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4167 SYS_P1536 ( TO_DATE(' 2017-02-19 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-03-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4230 SYS_P1537 ( TO_DATE(' 2017-01-29 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4113 SYS_P1538 ( TO_DATE(' 2017-02-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-26 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4069 SYS_P1539 ( TO_DATE(' 2017-02-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-03-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4215 SYS_P1540 ( TO_DATE(' 2017-01-22 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4138 SYS_P1541 ( TO_DATE(' 2017-02-19 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-26 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) USABLE 10 4176 SYS_P1542 ( TO_DATE(' 2017-02-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') , TO_DATE(' 2017-02-12 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian') ) */ </pre> <p>I&#8217;ve limited the index partition output to the index with partial indexing enabled so show that it&#8217;s the pre-defined partitions are marked as unusable and, as you can infer from the segement summary, those unusable index partition don&#8217;t have any segments space allocated to them.</p> <p>Stress tests are left to the interested reader.</p><br /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jonathanlewis.wordpress.com/17237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jonathanlewis.wordpress.com/17237/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=jonathanlewis.wordpress.com&#038;blog=491988&#038;post=17237&#038;subd=jonathanlewis&#038;ref=&#038;feed=1" width="1" height="1" /> Jonathan Lewis http://jonathanlewis.wordpress.com/?p=17237 Fri Jun 09 2017 05:13:40 GMT-0400 (EDT) Kscope17 Essbase Track Highlights – Natalie Delemar http://www.odtug.com/p/bl/et/blogaid=725&source=1 Natalie Delemar, ODTUG president, shares her top six Essbase track sessions with reasons why they are her “don’t miss sessions” at ODTUG Kscope17: ODTUG http://www.odtug.com/p/bl/et/blogaid=725&source=1 Thu Jun 08 2017 14:41:26 GMT-0400 (EDT) LEAP#318 555 Bistable Latch http://blog.tardate.com/2017/06/leap318-555-bistable-latch.html <p>Ben Eater’s 8-bit computer yields more interesting circuits. Here I’m reproducing his <a href="https://www.youtube.com/watch?v=WCwJNnx36Rk">bistable latch circuit based on the 555 timer</a>. This circuit takes advantage of the fact that the trigger and reset pins provide direct access to the SR latch within the 555 timer that drives the output. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/555Timer/Bistable">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/555Timer/Bistable"><img src="http://leap.tardate.com/Electronics101/555Timer/Bistable/assets/Bistable_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/06/leap318-555-bistable-latch.html Wed Jun 07 2017 08:02:30 GMT-0400 (EDT) 12c MultiTenant Posts -- 3 : Restore Individual PB http://hemantoracledba.blogspot.com/2017/06/12c-multitenant-posts-3-restore.html <div dir="ltr" style="text-align: left;" trbidi="on">Restoring the single PDB in a Container Database.<br /><br /><pre>$rman target /<br /><br />Recovery Manager: Release 12.2.0.1.0 - Production on Wed Jun 7 06:34:47 2017<br /><br />Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.<br /><br />connected to target database: ORCL12C (DBID=768045447)<br /><br />RMAN&gt; restore pluggable database newpdb;<br /><br />Starting restore at 07-JUN-17<br />using target database control file instead of recovery catalog<br />allocated channel: ORA_DISK_1<br />channel ORA_DISK_1: SID=30 device type=DISK<br /><br />channel ORA_DISK_1: starting datafile backup set restore<br />channel ORA_DISK_1: specifying datafile(s) to restore from backup set<br />channel ORA_DISK_1: restoring datafile 00016 to /u02/oradata/ORCL12C/4F793A6D323D1344E0530100007FABC7/datafile/o1_mf_system_dkj7f8go_.dbf<br />channel ORA_DISK_1: restoring datafile 00017 to /u02/oradata/ORCL12C/4F793A6D323D1344E0530100007FABC7/datafile/o1_mf_sysaux_dkj7f8hf_.dbf<br />channel ORA_DISK_1: restoring datafile 00018 to /u02/oradata/ORCL12C/4F793A6D323D1344E0530100007FABC7/datafile/o1_mf_undotbs1_dkj7f8hg_.dbf<br />channel ORA_DISK_1: restoring datafile 00019 to /u02/oradata/ORCL12C/4F793A6D323D1344E0530100007FABC7/datafile/o1_mf_mydata_dmbcp0wz_.dbf<br />channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/4F793A6D323D1344E0530100007FABC7/backupset/2017_06_05/o1_mf_nnndf_TAG20170605T061347_dmbcpvjr_.bkp<br />channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/4F793A6D323D1344E0530100007FABC7/backupset/2017_06_05/o1_mf_nnndf_TAG20170605T061347_dmbcpvjr_.bkp tag=TAG20170605T061347<br />channel ORA_DISK_1: restored backup piece 1<br />channel ORA_DISK_1: restore complete, elapsed time: 00:00:25<br />Finished restore at 07-JUN-17<br /><br />RMAN&gt; recover pluggable database newpdb;<br /><br />Starting recover at 07-JUN-17<br />using channel ORA_DISK_1<br /><br />starting media recovery<br /><br />archived log for thread 1 with sequence 16 is already on disk as file /u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/archivelog/2017_06_06/o1_mf_1_16_dmgyksjy_.arc<br />archived log for thread 1 with sequence 17 is already on disk as file /u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/archivelog/2017_06_07/o1_mf_1_17_dmhj6nbk_.arc<br />channel ORA_DISK_1: starting archived log restore to default destination<br />channel ORA_DISK_1: restoring archived log<br />archived log thread=1 sequence=15<br />channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/backupset/2017_06_05/o1_mf_annnn_TAG20170605T061438_dmbcrgml_.bkp<br />channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/backupset/2017_06_05/o1_mf_annnn_TAG20170605T061438_dmbcrgml_.bkp tag=TAG20170605T061438<br />channel ORA_DISK_1: restored backup piece 1<br />channel ORA_DISK_1: restore complete, elapsed time: 00:00:01<br />archived log file name=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/archivelog/2017_06_07/o1_mf_1_15_dmhoqlq3_.arc thread=1 sequence=15<br />channel default: deleting archived log(s)<br />archived log file name=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/archivelog/2017_06_07/o1_mf_1_15_dmhoqlq3_.arc RECID=4 STAMP=946017330<br />media recovery complete, elapsed time: 00:00:11<br />Finished recover at 07-JUN-17<br /><br />RMAN&gt; alter pluggable database newpdb open;<br /><br />Statement processed<br /><br />RMAN&gt; <br /></pre><br /><br />I had connected to the root to restore the PDB. <br />.<br />.<br /><br />.</div> Hemant K Chitale tag:blogger.com,1999:blog-1931548025515710472.post-4175018881195280611 Wed Jun 07 2017 06:36:00 GMT-0400 (EDT) Find all configured SystemComponents in Oracle Fusion Middleware - The RESTFul way http://dirknachbar.blogspot.com/2017/06/find-all-configured-systemcomponents-in.html Today, just a quick post on how to find all your configured System Components within an Oracle Fusion Middleware / Oracle WebLogic Server Environment.<br /><br />Let's say you are having an Oracle Forms &amp; Reports Environment based on an Oracle WebLogic Server. Within your environment you have configured various so called System Components, and you need to know all the names and the corresponding System Component Type, like:<br /><ul><li>Oracle HTTP Server (OHS)</li><li>Oracle Reports Standalone Servers</li><li>Oracle Forms</li></ul><div>With the Oracle WebLogic Server RESTFul Management Services you are able to list them all by name and including the type of System Component.</div><div><br /></div><div>Simply run following cURL command against your WebLogic Server hosting your Oracle Fusion Middleware Components:</div><div><br /><pre class="brush:bash"># Align the password of your Oracle WebLogic User<br /># Align the hostname and port of your WebLogic Server<br />curl \<br />--user weblogic:Oracle12c \<br />-H X-Requested-By:MyClient \<br />-H Accept:application/json \<br />-H Content-Type:application/json \<br />-d "{<br /> fields: [ 'name' ], links: [],<br /> children: {<br /> systemComponents: {<br /> fields: [ 'name' , 'componentType'],<br /> links: []<br /> }<br /> }<br />}" -X POST http://localhost:7001/management/weblogic/latest/domainConfig/search<br /><br />{<br /> "name": "FRDEVEL",<br /> "systemComponents": {"items": [<br /> {<br /> "componentType": "FORMS",<br /> "name": "forms1"<br /> },<br /> {<br /> "componentType": "OHS",<br /> "name": "ohs1"<br /> },<br /> {<br /> "componentType": "ReportsToolsComponent",<br /> "name": "reptools1"<br /> },<br /> {<br /> "componentType": "ReportsServerComponent",<br /> "name": "rep_server1"<br /> },<br /> {<br /> "componentType": "ReportsServerComponent",<br /> "name": "rep_server2"<br /> }<br /> ]}<br /><br /></pre></div><div><br /></div><div>Unfortunately you can not filter over componentType, as this is not a collection and therefor a query restriction on the componentType will be ignored :-(<br /><br />This method is a bit quicker then going through your $DOMAIN_HOME/system_components folder and get all your configured System Components.</div><br /><br /> Dirk Nachbar tag:blogger.com,1999:blog-4344684978957885806.post-1178488681837070573 Tue Jun 06 2017 11:02:00 GMT-0400 (EDT) LEAP#317 Discrete Schmitt Trigger http://blog.tardate.com/2017/06/leap317-discrete-schmitt-trigger.html <p>A Schmitt trigger is a comparator circuit with hysteresis, which can help overcome the effect of noise or oscillations on an input signal and provide positive switching between high and low logic levels. Schmitt triggers are often built into the input pins of integrated circuits. Stand-alone Schmitt triggers are usually constructed from comparators. The most basic Schmitt trigger can be implemented with discrete components, and here I’m exploring a classic emitter-coupled Schmitt Trigger circuit. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/SchmittTrigger/BasicDiscrete">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/SchmittTrigger/BasicDiscrete"><img src="http://leap.tardate.com/Electronics101/SchmittTrigger/BasicDiscrete/assets/BasicDiscrete_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/06/leap317-discrete-schmitt-trigger.html Tue Jun 06 2017 07:19:15 GMT-0400 (EDT) ऐसे ही http://ezsaid.blogspot.com/2017/06/blog-post.html ashish tag:blogger.com,1999:blog-14142302.post-7499646321878910185 Mon Jun 05 2017 12:33:00 GMT-0400 (EDT) Release News – What’s On Tap http://www.thatjeffsmith.com/archive/2017/06/release-news-whats-on-tap/ <p>SQL Developer has averaged about a single major release a year. We&#8217;ve also always had an Early Adopter or open beta where we would debut new features, and you could provide feedback.</p> <p>I think this worked &#8211; quite well even.<div id="attachment_6201" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/release-history.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/release-history.png" alt="" width="1024" height="575" class="size-full wp-image-6201" /></a><p class="wp-caption-text">Get ready to take a quantum leap forward!</p></div> <p>But that&#8217;s over.</p> <p>Starting later this year, you&#8217;ll see us put our product (SQLDev, Data Modeler, SQLcl, ORDS) release updates every quarter. This allows us to keep up with the frequent release cycles we see in our Oracle Public Cloud services.</p> <p>It also means you don&#8217;t have to wait as long for things like bug fixes and feature tweaks. </p> <p>It also ALSO means we&#8217;re going to change how we number the versions.</p> <p>Version 4.2 was the last version 4. Going forward, releases will be numbered by the Year.Quarter.Week of the release date.<br /> <div id="attachment_6197" style="width: 610px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/17.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/17.png" alt="" width="600" height="400" class="size-full wp-image-6197" /></a><p class="wp-caption-text">This might feel weird, for awhile. But it&#8217;ll be OK.</p></div> <p>It&#8217;ll be nice to know just how FAR out of date you are with your software <img src="https://s.w.org/images/core/emoji/2.2.1/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>More frequent updates means more iterative approach to building features. We like to go fast here, and now we can theoretically go even faster now. We still reserve the right to do an EA for &#8216;big stuff&#8217; &#8211; but don&#8217;t expect an EA each quarter, that just won&#8217;t be happening.</p> <p>So what&#8217;s next?</p> <h3>17.2 Things</h3> <p><strong>12c Sharding Support.</strong><br /> <div id="attachment_6198" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/shard.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/shard.png" alt="" width="1024" height="390" class="size-full wp-image-6198" /></a><p class="wp-caption-text">A very simple setup, but you get the idea.</p></div> <p>You&#8217;ll get an overview of your sharding directors, regions, groups, spaces, and of course, shards.</p> <p>You&#8217;ll be able to dive into the instance viewer for these individual databases, or get into our new Data Guard console.</p> <p><strong>Data Guard.</strong><div id="attachment_6199" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/dg1.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/dg1.png" alt="" width="1024" height="501" class="size-full wp-image-6199" /></a><p class="wp-caption-text">Lots of info to share&#8230;</p></div> <p>We&#8217;ll have a lot more to say about these new features when the release happens &#8211; there&#8217;s a lot more going on than just what you see in the screenshots.</p> <p><strong>Bug fixes</strong> &#8211; the things annoying you in v4.2 are annoying us too: the connection drop/reconnect stuff is on our &#8216;kill list&#8217;, tweaks to formatter behavior, fixing the data grid typing/input transposed characters stuff, copying/pasting stuff off the tree, etc. </p> <p>And, the preferences search just got a huge upgrade. Should be much easier to find options using the search.<div id="attachment_6200" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/search-options.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/search-options.png" alt="" width="1024" height="644" class="size-full wp-image-6200" /></a><p class="wp-caption-text">The search will find EVERYTHING that has that word on the preference label or description!</p></div> <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --> thatjeffsmith http://www.thatjeffsmith.com/?p=6196 Mon Jun 05 2017 10:11:09 GMT-0400 (EDT) Announcing the 2017 ODTUG Innovation Award Nominations http://www.odtug.com/p/bl/et/blogaid=724&source=1 New for 2017 - member voting! If you are an ODTUG member, you should have received a members only voting link to cast a vote for your favorite innovation. Thanks to all the individuals who nominated these outstanding individuals and their exceptionally innovative projects. ODTUG http://www.odtug.com/p/bl/et/blogaid=724&source=1 Mon Jun 05 2017 10:06:47 GMT-0400 (EDT) BGOUG Spring 2017 : The Journey Home http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/V1JgXreZE9k/ <p><a href="http://www.bgoug.org/en"><img class="alignleft size-full wp-image-7166" src="https://oracle-base.com/blog/wp-content/uploads/2017/05/bgoug.jpg" alt="" width="235" height="67" /></a>I got up at about 08:00 and headed down to breakfast, where I met a bunch of conference folks. Some of the people were leaving early, so when we were done we said our goodbyes. I then went back to my room for a few hours before heading down to the lobby for my lift back to Sofia. I got talking to <a href="https://twitter.com/BrynLite">Bryn</a> about REST, JSON, ORDS and PL/SQL, which carried on during the journey to Sofia in <a href="https://twitter.com/milenagerova">Milena</a>&#8216;s car. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Rather than leave stupidly early from Pravets to get an early flight on Sunday, I decided to leave the following day, which meant staying over in Sofia for a day. Milena dropped me off at the hotel and I spent the rest of the day in my room on the computer.</p> <p>The plan was I would be able to get loads of sleep and wake up at 04:00 to leave for my flight. The reality was I stayed awake until about 03:30. I don&#8217;t know why, but I just couldn&#8217;t sleep. There was nothing wrong with my room, but for some reason sleep didn&#8217;t come until ist was too late. At 04:00 my alarm went off and I felt like I had been kicked in the head. It might have been better to not drift off just before my alarm.</p> <p>I got cleaned up, packed the last of my stuff (including my laptop charger this time) and headed down to check out and get the shuttle to the airport.</p> <p>The airport was pretty busy. I couldn&#8217;t do an online check-in as my ticket was KLM, but the first leg of the trip was Bulgarian Air, so I had to queue at the check-in and bag-drop area, at the entrance to the gates, at security and at passport control. The queues were quite big, but moved quickly, so it wasn&#8217;t a problem.</p> <p>The flight from Sofia to Amsterdam took about 2.5 hours. We were a little late, but the gate for my next flight was close, so it wasn&#8217;t too much of a worry.</p> <p>The flight from Amsterdam to Birmingham took about 50 minutes. I arrived in Birmingham to 12 degrees C and rain, so it felt like being home. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> It was a quick ride home in the taxi, where I discovered my car had been stolen while I was away. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /> That gives me something to whine about for a bit, and I&#8217;m only happy when I&#8217;m moaning. I&#8217;ll put some washing on to cheer me up. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p><iframe src="https://www.youtube.com/embed/Ma2SXfUV9-c" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p> <p>Thanks to the folks from DXC for asking me to come across and spend the day with you before the conference. Special thanks to <a href="https://twitter.com/milenagerova">Milena</a> and everyone else from <a href="http://www.bgoug.org/en">BGOUG</a> for inviting me and making everything go so smoothly during my 7th visit to Bulgaria. Thanks to all the attendees for making this such a friendly event. I paid for this trip myself, but I would still like to thank the <a href="http://www.oracle.com/technetwork/community/oracle-ace/index.html">Oracle ACE Program</a> for letting me fly the flag.</p> <p>So that is my 7th BGOUG event over. I&#8217;m looking forward to number 8. See you all soon!</p> <p>Cheers</p> <p>Tim&#8230;</p> <p>PS. Posts for this conference include the following, some of which have brief videos. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <ul> <li><a href="https://oracle-base.com/blog/2017/05/31/bgoug-spring-2017-the-journey-begins/">BGOUG Spring 2017 : The Journey Begins</a></li> <li><a href="https://oracle-base.com/blog/2017/06/02/bgoug-spring-2017-day-off/">BGOUG Spring 2017 : Day Off?</a></li> <li><a href="https://oracle-base.com/blog/2017/06/03/bgoug-spring-2017-day-1/">BGOUG Spring 2017 : Day 1</a></li> <li><a href="https://oracle-base.com/blog/2017/06/03/bgoug-spring-2017-day-2/">BGOUG Spring 2017 : Day 2</a></li> <li>BGOUG Spring 2017 : The Journey Home (this post)</li> </ul> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/05/bgoug-spring-2017-the-journey-home/">BGOUG Spring 2017 : The Journey Home</a> was first posted on June 5, 2017 at 1:05 pm.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/V1JgXreZE9k" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7188 Mon Jun 05 2017 08:05:53 GMT-0400 (EDT) LEAP#316 The Boldport QSOP Breakout http://blog.tardate.com/2017/06/leap316-the-boldport-qsop-breakout.html <p>The QSOPBreakout was a special (read: beautiful!) board produced for the Boldport Club to help members practice QSOP-24 soldering techniques for the Touchy project. Firstly, I’m using this project to collate my notes on solder technique. And secondly, perhaps there is something useful I can do with the QSOPBreakout board after all .. other than use it as a breakout board of course. And it turns out there is .. see the <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/QSOPBreakout/SolarPendulum">SolarPendulum</a>! As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/QSOPBreakout">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/QSOPBreakout"><img src="http://leap.tardate.com/BoldportClub/QSOPBreakout/assets/QSOPBreakout_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/06/leap316-the-boldport-qsop-breakout.html Mon Jun 05 2017 07:18:45 GMT-0400 (EDT) 12c MultiTenant Posts -- 2 : Backup individual PDB http://hemantoracledba.blogspot.com/2017/06/12c-multitenant-posts-2-backup.html <div dir="ltr" style="text-align: left;" trbidi="on">In the 12c MultiTenant architecture, you can backup (and restore) individual PDBs. &nbsp;However, you must also backup the CDB (Root) ! &nbsp;You cannot restore a PDB as a "standalone" database --- it has to be restored back to the CDB.<br /><br /><pre>SQL&gt; startup mount;<br />ORACLE instance started.<br /><br />Total System Global Area 838860800 bytes<br />Fixed Size 8798312 bytes<br />Variable Size 343936920 bytes<br />Database Buffers 478150656 bytes<br />Redo Buffers 7974912 bytes<br />Database mounted.<br />SQL&gt; alter database archivelog;<br /><br />Database altered.<br /><br />SQL&gt; alter database open;<br /><br />Database altered.<br /><br />SQL&gt; alter pluggable database newpdb open;<br /><br />Pluggable database altered.<br /><br />SQL&gt; exit<br />Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production<br />$<br />$rman target /<br /><br />Recovery Manager: Release 12.2.0.1.0 - Production on Mon Jun 5 06:10:17 2017<br /><br />Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.<br /><br />connected to target database: ORCL12C (DBID=768045447)<br /><br />RMAN&gt; backup database root;<br /><br />Starting backup at 05-JUN-17<br />using target database control file instead of recovery catalog<br />allocated channel: ORA_DISK_1<br />channel ORA_DISK_1: SID=270 device type=DISK<br />channel ORA_DISK_1: starting full datafile backup set<br />channel ORA_DISK_1: specifying datafile(s) in backup set<br />input datafile file number=00001 name=/u01/app/oracle/oradata/orcl12c/system01.dbf<br />input datafile file number=00003 name=/u01/app/oracle/oradata/orcl12c/sysaux01.dbf<br />input datafile file number=00015 name=/u01/app/oracle/oradata/orcl12c/undotbs2.dbf<br />input datafile file number=00007 name=/u01/app/oracle/oradata/orcl12c/users01.dbf<br />channel ORA_DISK_1: starting piece 1 at 05-JUN-17<br />channel ORA_DISK_1: finished piece 1 at 05-JUN-17<br />piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/backupset/2017_06_05/o1_mf_nnndf_TAG20170605T061033_dmbcjttq_.bkp tag=TAG20170605T061033 comment=NONE<br />channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45<br />Finished backup at 05-JUN-17<br /><br />Starting Control File and SPFILE Autobackup at 05-JUN-17<br />piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/autobackup/2017_06_05/o1_mf_s_945843079_dmbcl8fm_.bkp comment=NONE<br />Finished Control File and SPFILE Autobackup at 05-JUN-17<br /><br />RMAN&gt; <br />RMAN&gt; backup pluggable database newpdb;<br /><br />Starting backup at 05-JUN-17<br />using channel ORA_DISK_1<br />channel ORA_DISK_1: starting full datafile backup set<br />channel ORA_DISK_1: specifying datafile(s) in backup set<br />input datafile file number=00017 name=/u02/oradata/ORCL12C/4F793A6D323D1344E0530100007FABC7/datafile/o1_mf_sysaux_dkj7f8hf_.dbf<br />input datafile file number=00016 name=/u02/oradata/ORCL12C/4F793A6D323D1344E0530100007FABC7/datafile/o1_mf_system_dkj7f8go_.dbf<br />input datafile file number=00018 name=/u02/oradata/ORCL12C/4F793A6D323D1344E0530100007FABC7/datafile/o1_mf_undotbs1_dkj7f8hg_.dbf<br />input datafile file number=00019 name=/u02/oradata/ORCL12C/4F793A6D323D1344E0530100007FABC7/datafile/o1_mf_mydata_dmbcp0wz_.dbf<br />channel ORA_DISK_1: starting piece 1 at 05-JUN-17<br />channel ORA_DISK_1: finished piece 1 at 05-JUN-17<br />piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/4F793A6D323D1344E0530100007FABC7/backupset/2017_06_05/o1_mf_nnndf_TAG20170605T061347_dmbcpvjr_.bkp tag=TAG20170605T061347 comment=NONE<br />channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25<br />Finished backup at 05-JUN-17<br /><br />Starting Control File and SPFILE Autobackup at 05-JUN-17<br />piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/autobackup/2017_06_05/o1_mf_s_945843252_dmbcqo6t_.bkp comment=NONE<br />Finished Control File and SPFILE Autobackup at 05-JUN-17<br /><br />RMAN&gt; <br />RMAN&gt; backup archivelog all delete input;<br /><br />Starting backup at 05-JUN-17<br />current log archived<br />using channel ORA_DISK_1<br />channel ORA_DISK_1: starting archived log backup set<br />channel ORA_DISK_1: specifying archived log(s) in backup set<br />input archived log thread=1 sequence=15 RECID=1 STAMP=945843278<br />channel ORA_DISK_1: starting piece 1 at 05-JUN-17<br />channel ORA_DISK_1: finished piece 1 at 05-JUN-17<br />piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/backupset/2017_06_05/o1_mf_annnn_TAG20170605T061438_dmbcrgml_.bkp tag=TAG20170605T061438 comment=NONE<br />channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01<br />channel ORA_DISK_1: deleting archived log(s)<br />archived log file name=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/archivelog/2017_06_05/o1_mf_1_15_dmbcrfq1_.arc RECID=1 STAMP=945843278<br />Finished backup at 05-JUN-17<br /><br />Starting Control File and SPFILE Autobackup at 05-JUN-17<br />piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/autobackup/2017_06_05/o1_mf_s_945843280_dmbcrjdg_.bkp comment=NONE<br />Finished Control File and SPFILE Autobackup at 05-JUN-17<br /><br />RMAN&gt; <br /></pre><br /><br />Thus, a PDB in a MultiTenant environment can be backed-up but the Root must always be backed up.<br />.<br />.<br />.<br /><br /></div> Hemant K Chitale tag:blogger.com,1999:blog-1931548025515710472.post-845937747429560386 Mon Jun 05 2017 06:16:00 GMT-0400 (EDT) JDev/ADF sample - Running ADF BC REST Service Together with ADF Faces Application http://andrejusb-samples.blogspot.com/2017/06/jdevadf-sample-running-adest.html <div dir="ltr" style="text-align: left;" trbidi="on"><ul><li><a href="http://andrejusb.blogspot.lt/2017/06/running-adf-bc-rest-service-together.html" target="_blank">Running ADF BC REST Service Together with ADF Faces Application</a>. ADF 12c provides out of the box support for ADF BC REST API. It is straightforward to create ADF BC REST service and run it. But what if you would like to expose ADF BC REST for existing ADF application with ADF Faces UI. This could be useful if there is a requirement to handle ADF Bindings access to ADF BC along with light ADF BC REST service API implementation for Oracle JET or other JavaScript clients. The same ADF application could handle two types of client access - ADF Faces and REST.</li></ul><ol>Download - <a href="https://docs.google.com/uc?export=download&amp;id=0Bw_kr1_tXc-edmc3Y1diNkZUbG8">ADFFacesRESTApp.zip</a></ol></div> Andrejus Baranovskis tag:blogger.com,1999:blog-4301764760924839143.post-6082903861516020675 Sat Jun 03 2017 07:07:00 GMT-0400 (EDT) BGOUG Spring 2017 : Day 2 http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/XHwGnkCDDyw/ <p><a href="http://www.bgoug.org/en"><img class="alignleft size-full wp-image-7166" src="https://oracle-base.com/blog/wp-content/uploads/2017/05/bgoug.jpg" alt="" width="235" height="67" /></a>Breakfast at 07:30 was surprisingly busy considering the late night. Food, coffee and chatting. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>After that I went back to the room to finish off the blog post about the previous day. Then it was time to start the day proper.</p> <p>The first session of the day was &#8220;Utilizing the data attribute: Client-side behaviour in APEX&#8221; by <a href="https://twitter.com/rhjmartens">Richard Martens</a>. I&#8217;m an <a href="https://oracle-base.com/blog/2015/11/09/the-eternal-newbie/">eternal newbie</a> at APEX, so its good to keep turning up to APEX sessions to see what a real APEX developer can do. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Next up was <a href="https://twitter.com/JoelJGoodman">Joel Goodman</a> with &#8220;Oracle Database 12cR2 Application Containers&#8221;. We chatted before the conference to make sure our sessions didn&#8217;t overlap too much. I like going to see other presenters covering similar topics to me. It&#8217;s good to see how they approach the topics and to get their opinions on a feature.</p> <p>Next up was &#8220;Oracle Compute Cloud vs. Amazon Web Services EC2 &#8211; A Hands-On Showdown&#8221; by <a href="https://twitter.com/Ahmed_Aboulnaga">Ahmed Aboulnaga</a>. This was another session where I was getting someone else&#8217;s view on a subject I present about. It was interesting to hear his views on the differences in pricing and maintenance of the two providers, and their move from AWS to Oracle Public Cloud.</p> <p>I got talking to Bryn at lunch and someone said, &#8220;Don&#8217;t you have a session in 2 minutes?&#8221; Quick dash to the room and it was me with &#8220;Put your feet up and take a REST. Take a tour of JSON support in the Oracle database&#8221;.</p> <p>Next up was &#8220;Exadata on-premises or in the cloud? The reasoning for our decision&#8221; by <a href="https://twitter.com/ValinRaki">Elise Valin-Raki</a> and <a href="https://twitter.com/HeliFromFinland">Heli Helskyaho</a>. The title of the session pretty well sums up what this was about. Literally going through the evaluation and decision process. By the way, they chose on-prem. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>After that it was a panel session, mostly focussed on security and the <a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">General Data Protection Regulation (GDPR)</a>. Lots of interesting conversation and yes, I had a drink during the session and was a bit drunk! <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>From there is was off to get some food and do more chatting. I got to have a longer chat with <a href="https://twitter.com/JulianDontcheff">Julian Dontcheff</a>, which was really nice. We have known each other since our days answering questions on <a href="http://www.dbasupport.com/forums/">DBASupport.com</a>, and we always speak at events all the time, but it was good to spend some more time with him.</p> <p>Gradually the food and beer took its toll and I switched into hibernate mode, so I said my goodbyes and went back to my room.</p> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/rOvu3HljfH0" frameborder="0" allowfullscreen></iframe></p> <p>That marks the end of another fantastic BGOUG event. I&#8217;ll save my proper thank you messages for a wrap-up post when I get home, but for now I would like to say a big thank you to everyone who came to the event! See you at breakfast tomorrow. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Cheers</p> <p>Tim&#8230;</p> <p>PS. It seems I pressed publish when this post was half-written. Whoops!</p> <p>PPS. It takes very little to get me drunk&#8230; <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/03/bgoug-spring-2017-day-2/">BGOUG Spring 2017 : Day 2</a> was first posted on June 3, 2017 at 11:12 am.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/XHwGnkCDDyw" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7178 Sat Jun 03 2017 06:12:21 GMT-0400 (EDT) BGOUG Spring 2017 : Day 1 http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/VsDt3B0Q7VM/ <p><a href="http://www.bgoug.org/en"><img class="alignleft size-full wp-image-7166" src="https://oracle-base.com/blog/wp-content/uploads/2017/05/bgoug.jpg" alt="" width="235" height="67" /></a>Day 1 started with far too much for breakfast, followed by trying to rehearse a new presentation as my laptop complained about having no power.</p> <p>The first session of the day was &#8220;Oracle Database Links&#8221; by <a href="https://twitter.com/JoelJGoodman">Joel Goodman</a>. I don&#8217;t care what the subject is, and how much you think you know about it, you will always come out of a session by Joel saying, &#8220;Well I never knew that!&#8221; I learnt some new stuff which I will now pretend I always knew! <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>The next session I went to was <a href="https://twitter.com/JulianDontcheff">Julian Dontcheff</a> with &#8220;45 most useful new DBA commands in Oracle 12.2&#8243;. I like sessions like this that act like an index of new features. A load of pointers to remind me what I should be learning. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> There is so much in 12.2 it&#8217;s both fun and depressing rolled into one. So much to learn and so little time.</p> <p>After that it was me with&#8221;Multitenant : What&#8217;s new in 12.2&#8221;. It&#8217;s impossible to fit all the new features into 1 hour, so I cherry picked a few and covered those, then listed the others and spoke briefly about them. The session was based on <a href="/articles/12c/multitenant-overview-container-database-cdb-12cr1#12201">these articles</a>. This was the first time I&#8217;ve done this presentation and I was a bit nervous, so I think I spoke a bit too fast. Hopefully people got the message that multitenant rules. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>After lunch I went to see <a href="https://twitter.com/datacharmer">Giuseppe Maxia</a> with &#8220;A quick tour of MySQL 8.0 roles&#8221;. This was really useful for me. There are some similarities to roles in Oracle, but also some really important differences too. I have been looking forward to this new feature, and this session will definitely save me time and some headaches when using it.</p> <p>From there it was on to <a href="https://twitter.com/ilmarkerm">Ilmar Kerm</a> with &#8220;Implementing incremental forever strategy for Oracle database backups&#8221;. This was based around <a href="https://oracle-base.com/articles/misc/incrementally-updated-image-copy-backups">Incrementally Updated Image Copy Backups</a>, but included some custom stuff they do with their storage. I&#8217;m always interested to see how people use the same tech as me, but use it in a different way. I can see how his approach may prove useful in a project I&#8217;ve got coming up soon. Interesting!</p> <p>The final session of the day for me was &#8220;Exadata : The Road Ahead&#8221; by <a href="https://twitter.com/RogerMacNicol">Roger MacNicol</a>. I know next to nothing about Exadata, so I feel like a total tourist when I&#8217;m in sessions about it. I think I may have sown the seed for a joint blog post between Roger and <a href="https://twitter.com/JLOracle">Jonathan Lewis</a> though. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>From there is was back to my room to catch up on work and blogging, before going to the evening event. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>I was a little late for the start of the evening event, but I got some food and watched the dancers do their thing. As that came to an end they got the crowd started by leading them in a dance, before leaving us to our own devices. I displayed my usual expert Bulgarian dancing skills. If you see any pictures or videos of a baby elephant waddling and sweating a lot, that is not me! <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/rOvu3HljfH0" frameborder="0" allowfullscreen></iframe></p> <p>At about midnight I turned into a pumpkin and went back to my room to bed!</p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/03/bgoug-spring-2017-day-1/">BGOUG Spring 2017 : Day 1</a> was first posted on June 3, 2017 at 7:07 am.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/VsDt3B0Q7VM" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7174 Sat Jun 03 2017 02:07:04 GMT-0400 (EDT) BGOUG Spring 2017 : Day Off? https://oracle-base.com/blog/2017/06/02/bgoug-spring-2017-day-off/ <p><a href="http://www.bgoug.org/en"><img class="alignleft size-full wp-image-7166" src="https://oracle-base.com/blog/wp-content/uploads/2017/05/bgoug.jpg" alt="" width="235" height="67" /></a>On my last visit to Bulgaria I got chatting to Todor Grigorov and I agreed to come and speak to his team at <a href="http://www.dxc.technology/">DXC</a> the next time I was in Bulgaria. Once I knew my sessions had been accepted for this conference I dropped him a line and said I was still up for it if he was interested, and so a plan was hatched. That&#8217;s why I arrived in Bulgaria a day early for a &#8220;day off&#8221;. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>At 08:30 Todor picked me up and took me to the DXC office, we all sat in a room and just started to talk. Rather than doing presentations, the idea was for this to be a day long informal question and answer session. This sort of thing can be quite daunting, especially when some of the people asking questions are better at this stuff than me, but it&#8217;s good to challenge yourself. The questions ranged from specific to general, and I gave answers ranging from technical to opinion. There were a couple of storage related questions I dodged with the line, &#8220;Email me your question and I&#8217;ll send it on to someone who will be able to answer it!&#8221; <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>There was one storage question from <a class="ProfileHeaderCard-nameLink u-textInheritColor js-nav" href="https://twitter.com/KrasimirKovachk">Krasimir Kovachki</a> that confused the hell out me. I thought he said &#8220;Team Provisioning&#8221; and I guess I must have looked like a rabbit in the headlights. A bit later was speaking to him and it dawned on me he had said &#8220;Thin Provisioning&#8221;, at which point his question made so much more sense and we had a discussion about that. That made me laugh. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>At lunch time we went out to get some food and guess who appeared on the TV behind us? That&#8217;s <a href="https://twitter.com/KrasimirKovachk">Krasimir</a> next to me. By the way, this photo was taken by another <a href="https://twitter.com/Krasimir_ed">Krasimir</a>. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p><img class="size-full wp-image-7172 alignnone" src="https://oracle-base.com/blog/wp-content/uploads/2017/06/tim0.jpg" alt="" width="2048" height="1536" /></p> <p>After lunch we got some drinks and went to sit in a park to continue the question and answer session in a less formal environment. I also got to try some <a href="https://en.wikipedia.org/wiki/Boza">boza</a> and <a href="https://en.wikipedia.org/wiki/Banitsa">banitsa</a>. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>It was a really fun day and it was nice to meet the ladies and gents that make up the team at DXC. Thanks for making me feel so welcome!</p> <p>At about 16:00 Todor drove me to take a quick look at <a href="http://www.sofia-guide.com/attraction/the-bells-monument/">The Bells Monument</a>, and waited for me to ring the UK bell before telling me adults weren&#8217;t supposed to ring them. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> From there it was a quick trip over to the Hilton to meet up with <a href="https://twitter.com/BrynLite">Bryn Llewellyn</a> and <a href="https://twitter.com/RogerMacNicol">Roger MacNicol</a> for our ride across to the <a href="http://www.riu.com/en/hotel/bulgaria/pravets/hotel-riu-pravets/">RIU Pravets Resort</a>, ready for the first day of the <a href="http://www.bgoug.org/en">BGOUG</a> Spring 2017 conference the following day.</p> <p>I got into my room, unpacked my stuff and it was then I noticed I didn&#8217;t have my laptop charger. Panic! I rang the hotel in Sofia, who had found it in my room, and said &#8220;someone&#8221; would be picking it up for me. I sent a panic email to Milena and Todor and we arranged for Todor to pick it up on his way to the conference the next day. Phew!</p> <p>That did leave me with no juice in the laptop, hence this blog post is coming out a day late and some work stuff has backed up. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>In the evening we walked round to the golf course on the other side of the lake and had some food. It was a really nice end to a very busy day!</p> <p>The next post will be about Day 1 of the conference (today). <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/06/02/bgoug-spring-2017-day-off/">BGOUG Spring 2017 : Day Off?</a> was first posted on June 2, 2017 at 6:46 pm.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /> Tim... https://oracle-base.com/blog/?p=7171 Fri Jun 02 2017 13:46:33 GMT-0400 (EDT) Oracle SOA Suite: Want performance? Don’t log so much and clean up your database! https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/ <p>The Oracle SOA Suite infrastructure, especially composites, use the database intensively. Not only are the process definitions stored in the database, also a lot of audit information gets written there. The SOA infrastructure database, if not well managed, will grow and will eventually have detrimental effects on performance. In this blog post I will give some quick suggestions that will help you increase performance of your SOA Suite infrastructure on the database side by executing some simple scripts. These are some suggestions I have seen work at different customers. Not only do they help managing the SOA Suite data in the database, they will also lead to better SOA Suite performance.</p> <p><span id="more-45080"></span></p> <h1>Do not log too much!</h1> <p>Less data is faster. If you can limit database growth, management becomes easier.</p> <ul> <li>Make sure the auditlevel of your processes is set to production level in production environments.</li> <li>Think about the BPEL setting <a href="https://docs.oracle.com/cd/E21764_01/core.1111/e10108/bpel.htm#ASPER99175">inMemoryOptimization</a>. This can only be set for processes that do not contain any dehydration points such as receive, wait, onMessage and onAlarm activities. If set to true, the completionpersistpolicy can be used to tweak what to do after completion of the process. For example only save information about faulted instances in the dehydration store. In 12c this setting is part of the &#8216;Oracle Integration Continuous Availability&#8217; feature and uses Coherence.</li> </ul> <p><a href="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/etMlT1M8-VkFEOtnvJ5B3moWF4U.jpg?ssl=1"><img data-attachment-id="45089" data-permalink="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/etmlt1m8-vkfeotnvj5b3mowf4u/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/etMlT1M8-VkFEOtnvJ5B3moWF4U.jpg?fit=1000%2C726&amp;ssl=1" data-orig-size="1000,726" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="etMlT1M8-VkFEOtnvJ5B3moWF4U" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/etMlT1M8-VkFEOtnvJ5B3moWF4U.jpg?fit=300%2C218&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/etMlT1M8-VkFEOtnvJ5B3moWF4U.jpg?fit=702%2C510&amp;ssl=1" class="aligncenter size-medium wp-image-45089" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/etMlT1M8-VkFEOtnvJ5B3moWF4U.jpg?resize=300%2C218&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/etMlT1M8-VkFEOtnvJ5B3moWF4U.jpg?resize=300%2C218&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/etMlT1M8-VkFEOtnvJ5B3moWF4U.jpg?resize=768%2C558&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/etMlT1M8-VkFEOtnvJ5B3moWF4U.jpg?w=1000&amp;ssl=1 1000w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></p> <h1>Start with a clean slate regularly</h1> <p>Especially for development environments it is healthy to regularly truncate all the major SOAINFRA tables. The script to do this is supplied by Oracle: <span style="text-decoration: underline;">MW_HOME/SOA_ORACLE_HOME/rcu/integration/soainfra/sql/truncate/truncate_soa_oracle.sql</span></p> <p>The effect of executing this script is that all instance data is gone. This includes all tasks, long running BPM processes, long running BPEL processes, recoverable errors. For short everything except the definitions. The performance gain from executing the script can be significant. You should consider for example to run the script at the end of every sprint to start with a clean slate.</p> <h1><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/clean-slate-480x320.jpg?ssl=1"><img data-attachment-id="45088" data-permalink="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/clean-slate-480x320/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/clean-slate-480x320.jpg?fit=480%2C320&amp;ssl=1" data-orig-size="480,320" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="clean-slate-480&#215;320" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/clean-slate-480x320.jpg?fit=300%2C200&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/clean-slate-480x320.jpg?fit=480%2C320&amp;ssl=1" class="aligncenter size-medium wp-image-45088" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/clean-slate-480x320.jpg?resize=300%2C200&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/clean-slate-480x320.jpg?resize=300%2C200&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/clean-slate-480x320.jpg?resize=480%2C320&amp;ssl=1 480w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a>Delete instances</h1> <p>Oracle has provided scripts to remove old instances. These are scheduled by default in a clean installation of 12c. If you upgrades from 11g to 12c, this scheduling is not enabled by default. The auto-purge feature of 12c is described <a href="https://blogs.oracle.com/ardaeralp/oracle-soa-12c-auto-purge-new-feature">here</a>.</p> <p>What this feature does is execute the standard supplied purge scripts: <span style="text-decoration: underline;">MW_HOME/SOA_ORACLE_HOME/rcu/integration/soainfra/sql/soa_purge/soa_purge_scripts.sql</span></p> <p>In a normal SOA Suite 12c installation you can also find the scripts in <span style="text-decoration: underline;">MW_HOME/SOA_ORACLE_HOME/common/sql/soainfra/sql/oracle</span></p> <p>In 12c installations, the patched purge scripts for older versions are also supplied. I would use the newest version of the scripts since the patches sometimes fix logic which can cause data inconsistencies which can have consequences later, for example during migrations.</p> <p>What the scripts do is nicely described <a href="https://www.c2b2.co.uk/middleware-blog/purging-data-from-oracle-soa-suite-11g.php">here</a>. These scripts only remove instances you should not miss. Running instances and instances which can be recovered, are not deleted. In the script you can specify for how long data should be retained.</p> <p>You should schedule this and run it daily. The shorter the period you keep information, the more you can reduce your SOAINFRA space usage and the better the performance of the database will be.</p> <p>An example of how to execute the script:</p> <p>DECLARE<br /> MAX_CREATION_DATE TIMESTAMP;<br /> MIN_CREATION_DATE TIMESTAMP;<br /> BATCH_SIZE        INTEGER;<br /> MAX_RUNTIME       INTEGER;<br /> RETENTION_PERIOD  TIMESTAMP;<br /> BEGIN<br /> MIN_CREATION_DATE := TO_TIMESTAMP(TO_CHAR(sysdate-2000, &#8216;YYYY-MM-DD&#8217;),&#8217;YYYY-MM-DD&#8217;);<br /> MAX_CREATION_DATE := TO_TIMESTAMP(TO_CHAR(sysdate-30, &#8216;YYYY-MM-DD&#8217;),&#8217;YYYY-MM-DD&#8217;);<br /> RETENTION_PERIOD  := TO_TIMESTAMP(TO_CHAR(sysdate-29, &#8216;YYYY-MM-DD&#8217;),&#8217;YYYY-MM-DD&#8217;);<br /> MAX_RUNTIME       := 180;<br /> BATCH_SIZE        := 250000;</p> <p>SOA.DELETE_INSTANCES(<br /> MIN_CREATION_DATE    =&gt; MIN_CREATION_DATE,<br /> MAX_CREATION_DATE    =&gt; MAX_CREATION_DATE,<br /> BATCH_SIZE           =&gt; BATCH_SIZE,<br /> MAX_RUNTIME          =&gt; MAX_RUNTIME,<br /> RETENTION_PERIOD     =&gt; RETENTION_PERIOD,<br /> PURGE_PARTITIONED_COMPONENT =&gt; FALSE);<br /> );</p> <p>END;<br /> /</p> <p>The script also has a variant which can be executed in parallel (which is faster) but that requires extra grants for the SOAINFRA database user.</p> <p><a href="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/1303-and-itsgone.jpg?ssl=1"><img data-attachment-id="45087" data-permalink="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/1303-and-itsgone/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/1303-and-itsgone.jpg?fit=960%2C540&amp;ssl=1" data-orig-size="960,540" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1303-and-itsgone" data-image-description=""quot;https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/1303-and-itsgone.jpg?fit=300%2C169&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/1303-and-itsgone.jpg?fit=702%2C395&amp;ssl=1" class="aligncenter size-medium wp-image-45087" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/1303-and-itsgone.jpg?resize=300%2C169&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/1303-and-itsgone.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/1303-and-itsgone.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/1303-and-itsgone.jpg?w=960&amp;ssl=1 960w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></p> <h1>Shrink space</h1> <h2>Tables</h2> <p>Deleting instances will not free up space on the filesystem of the server. Nor does it make sure that the data is not fragmented over many tablespace segments. Oracle does not provide standard scripts for this but does tell you this is a good idea and explains why <a href="http://docs.oracle.com/cd/E36909_01/admin.1111/e10226/soa-database-management.htm">here</a> (9.5.2). In addition you can rebuild indexes. You should also of course run a daily gather statistics on the schema.</p> <p>For 11g you can use <a href="https://github.com/MaartenSmeets/weblogic/blob/master/SOASuite/shrink/shrink_space_tables_rebuild_indexes.sql">this script</a> to shrink space for tables and rebuild indexes. You should execute it under XX_SOAINFRA where XX if your schema prefix.</p> <p><a href="http://docs.oracle.com/cd/E36909_01/admin.1111/e10226/soa-database-management.htm"><img data-attachment-id="45086" data-permalink="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/soaag_dt_004/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/soaag_dt_004.png?fit=618%2C254&amp;ssl=1" data-orig-size="618,254" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="soaag_dt_004" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/soaag_dt_004.png?fit=300%2C123&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/soaag_dt_004.png?fit=618%2C254&amp;ssl=1" class="aligncenter wp-image-45086 size-medium" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/soaag_dt_004.png?resize=300%2C123&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/soaag_dt_004.png?resize=300%2C123&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/soaag_dt_004.png?w=618&amp;ssl=1 618w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></p> <h2>LOBs</h2> <p>LOB columns are saved outside of the tables and can be shrunk separately. In the below script you should replace XX_SOAINFRA with your SOAINFRA schema. The script explicitly drops BRDECISIONINSTANCE_INDX5 since the table can become quite large in development environments and you cannot shrink it with the index still on it. <a href="https://github.com/MaartenSmeets/weblogic/blob/master/SOASuite/shrink/shrink_lobs.sql">This script</a> also might overlap with the script above for tables with LOB columns. It only shrinks for large tables where the LOB columns take more than 100Mb of space.</p> <h1>Other database suggestions</h1> <h2>Redo log size</h2> <p>Not directly related to cleaning, but related to SOAINFRA space management. The Oracle database uses so-called redo-log files to store all changes to the database. In case of a database instance failure, the database can use these redo-log files to recover. Usually there are two or more redo-logfiles. These files are rotated: if one is full, it goes to the next. When the last one is filled, it goes back to the first one overriding old data. Read more about redo-logs <a href="https://docs.oracle.com/cd/B28359_01/server.111/b28310/onlineredo001.htm#ADMIN11302">here</a>. Rotating a redo-log file takes some time. When the redo-log files are small, they are rotated a lot. <a href="http://www.dba-oracle.com/oracle_tips_sizing_advisor.htm">The following</a> provides some suggestions in analyzing if increasing the size will help you. I&#8217;ve seen default values of 3 redo-log files of 100Mb. Oracle recommends having 3 groups of 2Gb each <a href="https://docs.oracle.com/cd/E27559_01/doc.1112/e28552/top_issues.htm#ASPER99718">here</a>.</p> <p><a href=" https://docs.oracle.com/cd/B19306_01/server.102/b14231/onlineredo.htm"><img data-attachment-id="45085" data-permalink="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/admin054/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/admin054.gif?fit=364%2C406&amp;ssl=1" data-orig-size="364,406" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="admin054" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/admin054.gif?fit=269%2C300&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/admin054.gif?fit=364%2C406&amp;ssl=1" class="aligncenter wp-image-45085 size-medium" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/admin054.gif?resize=269%2C300&#038;ssl=1" alt="" data-recalc-dims="1" /></a></p> <h2>Clean up long running and faulted instances!</h2> <p>The regular cleaning scripts which you might run on production do not clean instances which have an ECID which is the same as an instance which cannot be cleaned because it is for example still running or recoverable. If you have many processes running, you might be able to win a lot by for example restarting the running processes with a new ECID. You do have to build that functionality for yourself though. Also you should think about keeping track of time for tasks. If a certain task is supposed to only be open for a month, let it expire after a month. If you do not check this, you might encounter large numbers of tasks which remain open. This mains the instance which has created the task will remain open. This means you cannot undeploy the version of the process which has this task running. Life-cycle management is a thing!</p> <h1><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?ssl=1"><img data-attachment-id="45083" data-permalink="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/maxresdefault/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?fit=1280%2C720&amp;ssl=1" data-orig-size="1280,720" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="maxresdefault" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?fit=300%2C169&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?fit=702%2C395&amp;ssl=1" class="aligncenter size-medium wp-image-45083" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?resize=300%2C169&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?resize=300%2C169&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?resize=768%2C432&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/maxresdefault.jpg?w=1280&amp;ssl=1 1280w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a>Finally</h1> <h2>SOAINFRA is part of the infrastructure</h2> <p>Oracle SOA Suite logs a lot of audit information in the SOAINFRA database. You might be tempted to join that information to other business data directly on database level. This is not a smart thing to do.</p> <p>If the information in the SOAINFRA database is used to for example query BPM processes or tasks, especially when this information is being joined over a database link to another database with additional business data, you have introduced a timebomb. The performance will be directly linked to the amount of data in the SOAINFRA database and especially with long running processes and tasks. You have now not only introduced a potential performance bottleneck for all your SOA composites but also for other parts of your application.</p> <p><a href="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/Time-Bomb-Alarm-Clock.jpg?ssl=1"><img data-attachment-id="45082" data-permalink="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/time-bomb-alarm-clock/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/Time-Bomb-Alarm-Clock.jpg?fit=600%2C405&amp;ssl=1" data-orig-size="600,405" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Time-Bomb-Alarm-Clock" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/Time-Bomb-Alarm-Clock.jpg?fit=300%2C203&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/Time-Bomb-Alarm-Clock.jpg?fit=600%2C405&amp;ssl=1" class="aligncenter size-medium wp-image-45082" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/Time-Bomb-Alarm-Clock.jpg?resize=300%2C203&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/Time-Bomb-Alarm-Clock.jpg?resize=300%2C203&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/Time-Bomb-Alarm-Clock.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></p> <h2>It is not a system of records</h2> <p>Secondly, the business might demand you keep the information for a certain period. Eventually they might even want to keep the data forever and use it for audits of historic records. This greatly interferes with purging strategies, which are required if you want to keep your environment to have good performance. If the business considers certain information important to keep, create a table and store the relevant information there.<a href="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/daffymine.jpeg?ssl=1"><img data-attachment-id="45084" data-permalink="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/daffymine/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/daffymine.jpeg?fit=380%2C221&amp;ssl=1" data-orig-size="380,221" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="daffymine" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/daffymine.jpeg?fit=300%2C174&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/daffymine.jpeg?fit=380%2C221&amp;ssl=1" class="aligncenter size-medium wp-image-45084" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/daffymine.jpeg?resize=300%2C174&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/daffymine.jpeg?resize=300%2C174&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/daffymine.jpeg?w=380&amp;ssl=1 380w" sizes="(max-width: 300px) 100vw, 300px" data-recalc-dims="1" /></a></p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/06/02/oracle-soa-suite-want-performance-dont-log-and-clean-up-your-database/">Oracle SOA Suite: Want performance? Don&#8217;t log so much and clean up your database!</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Maarten Smeets https://technology.amis.nl/?p=45080 Fri Jun 02 2017 12:12:22 GMT-0400 (EDT) Kscope17 EPM Data Integration Session Highlights - Tony Scalese http://www.odtug.com/p/bl/et/blogaid=723&source=1 With ODTUG Kscope17 less than one month away, here is a highlight of the Kscope17 EPM Data Integration sessions that Tony Scalese is most excited to attend and why he thinks you should attend them: ODTUG http://www.odtug.com/p/bl/et/blogaid=723&source=1 Fri Jun 02 2017 11:31:57 GMT-0400 (EDT) Mandatory SQLDev Tip: Filter Your History http://www.thatjeffsmith.com/archive/2017/06/mandatory-sqldev-tip-filter-your-history/ <p>It&#8217;s Friday!</p> <p>Let&#8217;s be honest though &#8211; you&#8217;ve not accomplished much this week. Monday was a holiday, emails have stacked up, lots of your co-workers are on vacation.</p> <p>So how can we rescue this losing scenario and turn it into a major victory?</p> <p>This trick will save you so much time, you&#8217;ll be mad I didn&#8217;t make you learn it earlier.</p> <h3>Apply a Filter to Your SQL History</h3> <p>Next week we&#8217;re going to work on our APP1234 project. We know the driving table on this project is the XYZ table. So let&#8217;s ONLY look at the code we&#8217;ve written that touches that project.</p> <div id="attachment_6193" style="width: 1037px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/mandatory1.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/mandatory1.png" alt="" width="1027" height="727" class="size-full wp-image-6193" /></a><p class="wp-caption-text">F8 &#8211; brings up the History panel.</p></div> <p>The search/filter will look across the entire grid, so you could also filter on CONNECTION, double-score!</p> <p>Ok, so you put in your filter&#8230;<div id="attachment_6194" style="width: 773px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/mandatory2.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/mandatory2.png" alt="" width="763" height="482" class="size-full wp-image-6194" /></a><p class="wp-caption-text">Excellent.</p></div> <p>Now you&#8217;re REALLY ready to be productive.</p> <h3>Almost&#8230;Now close/hide the History Panel</h3> <p>You want as much of the screen as you can get for your code. You can also <a href="http://www.thatjeffsmith.com/archive/2012/02/sql-developer-trick-double-click-to-go-full-screen/" target="_blank">double-click on the worksheet tab to auto-hide</a> ALL of the panels on your SQLDev Desktop. &#8212; See what I did there, a free bonus tip! &#8212;</p> <p>Now use the Keyboard to pull up your code. On windows, that&#8217;s Ctrl+DownArrow (or UP to switch directions.)</p> <div id="attachment_6195" style="width: 944px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/mandatory.gif"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/06/mandatory.gif" alt="" width="934" height="726" class="size-full wp-image-6195" /></a><p class="wp-caption-text">Sweet, sweet bliss.</p></div> <p>When your co-workers hear you laughing/crying, tell them you&#8217;re happy, so happy. Then show them this trick in a few months after your productivity has leapfrogged them into that raise/promotion. </p> <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --> thatjeffsmith http://www.thatjeffsmith.com/?p=6192 Fri Jun 02 2017 10:35:21 GMT-0400 (EDT) Open Brief aan Oracle Professionals – gun jezelf twee dagen kennismaking met je toekomst – op 15 en 16 juni 2017 bij de OGH TechExperience 2017 https://technology.amis.nl/2017/06/02/open-brief-aan-oracle-professionals-gun-jezelf-twee-dagen-kennismaking-met-je-toekomst-op-15-en-16-juni-2017-bij-de-ogh-techexperience-2017/ <p><a href="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image-5.png?ssl=1"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image_thumb-5.png?resize=244%2C130&#038;ssl=1" align="right" data-recalc-dims="1"></a>Beste Oracle professional, </p> <p>Of je nu Oracle Database ontwikkelaar bent, DBA, ADF ontwikkelaar, BI specialist,&nbsp; of SOA Suite specialist, de nieuwsgierigheid blijft altijd kriebelen. Hoop ik. Je wilt beter worden in je vak, nieuwe dingen leren, minimaal bijblijven en je blijven doorontwikkelen. Het is best lastig om in de hectiek en de druk van je dagelijkse werk daar tijd en ruimte voor te maken. Af en toe een week naar Oracle OpenWorld of een conferentie in een ver oord zou mooi zijn, maar is vast niet zo makkelijk te regelen met je manager, je thuisfront of je boekhouder. </p> <p>Op 15 en 16 juni 2017 komt die internationale conferentie naar jou toe. Op die dagen vindt in De Rijtuigloods in Amersfoort de Tech Experience conferentie plaats, georganiseerd door OGh. In 90 sessies treden ruim 70 sprekers aan, afkomstig uit Nederland en allerlei buitenlanden. waaronder Oracle ACEs en ACE Directors en enkele aansprekende experts van Oracle Corporation. Heel veel concrete praktijkkennis loopt hier rond. Dit evenement biedt je dus de gelegenheid om in heel korte tijd en heel dicht bij huis over allerlei onderwerpen de breedte en de diepte in te gaan en ook meer te leren over waar je in je dagelijkse praktijk mee bezig bent of tegenaan loopt. </p> <p>De hoofdthema’s van de conferentie zijn: </p> <ul> <ul> <li><em>Database</em> – zowel database administration als database development (SQL, PL/SQL) <li><em>Engineered Systems</em> <li><em>Web &amp; Mobile – User eXperience en User Interface development</em> met onder andere ADF, Oracle JET en rich client JavaScript web development frameworks <li><em>Integratie &amp; API Management</em>– web services, SOA (Suite), BPM (Suite), API management <li><em>Business Intelligence</em> <li><em>Middleware Platform (CAF)</em> – WebLogic &amp; JCS</li> </ul> </ul> <p>De cloud komt in diverse sessies langs, security en architectuur zijn terugkerende elementen en praktijktoepassingen spelen een grote rol. Daarnaast zijn er in veel sessies demo’s te zien. </p> <p>De conferentie is kleinschalig, laagdrempelig en intiem genoeg om sprekers en andere deelnemers makkelijk aan te spreken en om tips en oplossingen te vragen en ervaringen uit te wisselen. De sessies gaan veelal de diepte in met sprekers die praktijk-specialist zijn op hun onderwerp. Je kunt in deze twee heel intensieve dagen meer te leren over onderwerpen waar je al in de praktijk mee bezig bent – en horen hoe je peers zaken aanpakken en uitdagingen oplossen. Daarnaast heb je de kans om inspiratie op te doen, een gevoel te krijgen voor toekomstige ontwikkelingen en de kansen die daaruit voortkomen en de kruisbestuiving te ervaren tussen verschillende technologieën. </p> <p>Ik zou je van harte willen adviseren om jezelf deze twee dagen te gunnen. Om een stap te zetten in je kennis en je bewustzijn van wat er allemaal speelt en aan zit te komen. En om te ervaren hoe het is om met honderden vakgenoten samen te zijn, ervaringen uit te wisselen en plannen te vergelijken. Een internationale conferentie, in je voortuin. Die kans doet zich niet zo vaak voor. Grijp hem dus. </p> <p>Details over de agenda vind je op <a href="https://www.ogh.nl/techex/">https://www.ogh.nl/techex/</a>. Ook vind je informatie over de indrukwekkende line-up aan sprekers en details van de sessies, de locatie en het registratieformulier. De kosten voor twee dagen zijn 475 euro (en 175 euro voor leden van OGh). Twee collega’s kunnen op één inschrijving elk één van de beide dagen bijwonen. </p> <p>Ik heb in mijn carrière al een flink aantal Oracle conferenties bezocht. En het is soms moeilijk om aan anderen – die er niet waren – uit te leggen wat zo bijzonder en waardevol is aan zo’n evenement. Een paar trefwoorden zijn: energie, enthousiasme, inspiratie, plezier, bevestiging en erkenning, delen, verbinding, expertise, diepgang en de interactie met gelijkgestemde zielen uit allerlei organisaties, landen en culturen. Een internationale conferentie waar de top-specialisten op diverse gebieden aanwezig zijn en direct aanspreekbaar zijn voegt voor mij een belangrijke dimensie toe aan mijn dagelijkse werk. Dat is niet allemaal heel concreet in waarde uit te drukken – maar ik hoop van harte dat je ruimte vindt in je agenda en je budget om op 15 en 16 juni tijdens de Tech Experience 2017 conferentie zelf te ervaren wat ik zo bijzonder en waardevol vind. Mijn collega Job Oprel schreef recent een blog artikel waarin hij ook beschrijft wat de waarde is van deelname aan een conferentie; lees ook zijn verhaal: <a href="https://technology.amis.nl/2016/05/03/why-going-to-a-seminar-or-conference/">Why go to a seminar or conference?</a> </p> <p>NB: ik spreek af en toe Oracle specialisten die eigenlijk vorig jaar wel naar de AMIS25 Beyond the Horizon conferentie hadden willen gaan, maar dachten dat hun manager dat wel niet goed zou vinden. In sommige gevallen hadden ze dat niet eens gevraagd aan de betreffende manager. Om te helpen je manager te overtuigen heb ik een tweede open brief geschreven &#8211; aan jouw manager: <a title="https://technology.amis.nl/2017/06/02/oproep-aan-managers-van-oracle-professionals-gun-je-team-de-tech-experience-2017-15-16-juni/" href="https://technology.amis.nl/2017/06/02/oproep-aan-managers-van-oracle-professionals-gun-je-team-de-tech-experience-2017-15-16-juni/">https://technology.amis.nl/2017/06/02/oproep-aan-managers-van-oracle-professionals-gun-je-team-de-tech-experience-2017-15-16-juni/</a> . Als jij overtuigd bent, ga dan naar je manager en laat haar of hem desnoods mijn open brief lezen. Je hoort als Oracle professional gewoon dit evenement te bezoeken! Zorg dat je erbij bent. </p> <p>&nbsp; </p> <p>Hartelijke groeten en graag tot 15 en/of 16 juni in Amersfoort. </p> <p>Lucas Jellema</p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/06/02/open-brief-aan-oracle-professionals-gun-jezelf-twee-dagen-kennismaking-met-je-toekomst-op-15-en-16-juni-2017-bij-de-ogh-techexperience-2017/">Open Brief aan Oracle Professionals &ndash; gun jezelf twee dagen kennismaking met je toekomst &ndash; op 15 en 16 juni 2017 bij de OGH TechExperience 2017</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Lucas Jellema https://technology.amis.nl/?p=45077 Fri Jun 02 2017 01:25:35 GMT-0400 (EDT) Materials for Workshop Microservices Choreography with Kubernetes, Docker, Kafka and Node.JS https://technology.amis.nl/2017/06/02/materials-for-workshop-microservices-choreography-with-kubernetes-docker-kafka-and-node-js/ <p><a href="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image-1.png?ssl=1"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image_thumb-1.png?resize=431%2C247&#038;ssl=1" align="right" data-recalc-dims="1"></a>Thursday June 1st &#8211; yet another community event at AMIS. This one dedicated to Microservices. What are microservices, why do we think they are interesting? How are they different? How can they be implemented and how do you deploy them? What is a microservices platform and what generic capabilities should such a platform offer? How can we make microservices act together &#8211; to perform a workflow &#8211; if they are to be isolated and unaware of each other? These are some of the questions that we discussed. </p> <p><a href="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image-2.png?ssl=1"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: left; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image_thumb-2.png?resize=244%2C132&#038;ssl=1" align="left" data-recalc-dims="1"></a></p> <p>Through demonstrations with Kubernetes and Docker with Node.JS, Kafka , Redis as implementing technologies, we discussed a possible implementation of microservices choreograhy &#8211; stateless, horizontally scalable microservices participating in a workflow driven by events &#8211; without any direct interaction. This figure visualizes the topology that we discussed and subsequently worked on during a hands on workshop:</p> <p><a href="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image-3.png?ssl=1"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="image" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image_thumb-3.png?resize=536%2C266&#038;ssl=1" data-recalc-dims="1"></a></p> <p>&nbsp;</p> <p>All materials for the presentation and the workshop are on GitHub: <a title="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017" href="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017">https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017</a> &#8211; and all required software is open source and freely downloadable.</p> <p><a href="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image-4.png?ssl=1"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="image" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image_thumb-4.png?resize=589%2C370&#038;ssl=1" data-recalc-dims="1"></a></p> <p>Feel free to give the workshop a spin.</p> <p>During Oracle Code London I presented a shorter version of the presentation that was part of this workshop. You can watch that presentation from Oracle Code London on YouTube (<a title="https://www.youtube.com/watch?v=5Nf7acMU5WA&amp;index=6&amp;list=PLTwx5YGQHdjlLm8BP5l0Zig6BL6YUn2-6" href="https://www.youtube.com/watch?v=5Nf7acMU5WA&amp;index=6&amp;list=PLTwx5YGQHdjlLm8BP5l0Zig6BL6YUn2-6">https://www.youtube.com/watch?v=5Nf7acMU5WA&amp;index=6&amp;list=PLTwx5YGQHdjlLm8BP5l0Zig6BL6YUn2-6</a>):</p> <p><iframe height="315" src="https://www.youtube.com/embed/5Nf7acMU5WA?list=PLTwx5YGQHdjlLm8BP5l0Zig6BL6YUn2-6" frameborder="0" width="560" allowfullscreen></iframe></p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/06/02/materials-for-workshop-microservices-choreography-with-kubernetes-docker-kafka-and-node-js/">Materials for Workshop Microservices Choreography with Kubernetes, Docker, Kafka and Node.JS</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Lucas Jellema https://technology.amis.nl/?p=45073 Fri Jun 02 2017 01:00:45 GMT-0400 (EDT) Oproep aan Managers van Oracle Professionals: gun je team de Tech Experience 2017 (15 & 16 juni) https://technology.amis.nl/2017/06/02/oproep-aan-managers-van-oracle-professionals-gun-je-team-de-tech-experience-2017-15-16-juni/ <p><a href="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image.png?ssl=1"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/06/image_thumb.png?resize=471%2C249&#038;ssl=1" align="right" data-recalc-dims="1"></a>Beste Manager of Team Leider van Oracle professionals, </p> <p>Als je Oracle professionals in je team hebt – of dat nu Oracle DBAs, PL/SQL ontwikkelaars of middleware ontwikkelaars zijn – in alle gevallen is persoonlijke groei en kennisontwikkeling een voortdurend streven. Van je mensen – en als ze dat zelf al hier en daar vergeten dan toch in elk geval van jou als hun coach. In dat kader is er half juni een niet te missen gelegenheid om in twee dagen, dicht bij huis, een evenement met internationale allure te bezoeken en daar op allerlei onderwerpen intensief inspiratie, kennis en ervaringen op te doen. En ook om over de dagelijkse problemen en uitdagingen van vakgenoten te leren en oplossingen op te doen. </p> <p>De Oracle Gebruikersgroep Holland (OGh) organiseert the Tech Experience 2017 conferentie op 15 en 16 juni in de Rijtuigenloods in Amsersfoort. Deze conferentie omvat 90 sessies van ruim 70 top-sprekers uit Nederland en de rest van de wereld, waaronder Oracle ACEs en ACE Directors en enkele aansprekende experts van Oracle Corporation. </p> <p>De hoofdthema’s van de conferentie zijn: </p> <ul> <li><em>Database</em> – zowel database administration als database development (SQL, PL/SQL) <li><em>Engineered Systems</em> <li><em>Web &amp; Mobile – User eXperience en User Interface development</em> met onder andere ADF, Oracle JET en rich client JavaScript web development frameworks <li><em>Integratie &amp; API Management</em>– web services, SOA (Suite), BPM (Suite), API management <li><em>Business Intelligence</em> <li><em>Middleware Platform (CAF)</em> – WebLogic, Exalogic </li> </ul> <p>De cloud komt in diverse sessies langs, security en architectuur zijn terugkerende elementen en praktijktoepassingen spelen een grote rol. </p> <p>De conferentie is kleinschalig, laagdrempelig en intiem genoeg om sprekers en andere bezoekers makkelijk aan te spreken en om tips, oplossingen en ervaringen te vragen. De sessies gaan veelal de diepte in met sprekers die praktijk-specialist zijn op hun onderwerp en hebben de waarde van een mini-training. En meer dan in een heel gerichte training is dit een evenement waar het opdoen van inspiratie en de kruisbestuiving tussen verschillende terreinen de extra waarde geeft. </p> <p>Deelnemers hebben de gelegenheid om in twee heel intensieve dagen meer te leren op onderwerpen waar zelf al in de praktijk mee bezig zijn &#8211; en te horen hoe ervaringsdeskundigen zaken aanpakken en uitdagingen oplossen. Daarnaast is dit een mooie gelegenheid om vooruit te kijken op onderwerpen die er misschien al aan zitten te komen of er aan zouden gaan komen. IT professionals zitten door de waan van de dag en constante focus nog wel eens in een soort tunnel – de Tech Experience biedt de kans daar uit te breken. </p> <p>Als CTO van AMIS ben ik niet objectief. Ik ben razend enthousiast over deze conferentie, het programma en de sprekers, de onderwerpen en de energie die we tijdens die twee dagen gaan genereren en delen. Deze krent in de pap geeft inspiratie en enthousiasme voor Oracle specialisten om lange tijd op te teren. Mijn collega’s moeten hier dus heen vind ik. En wat mij betreft geldt dat voor alle Oracle professionals in Nederland – dus zeker ook voor jouw medewerkers. Gun ze dit stuk opleiding, dwing ze desnoods twee dagen het dagelijkse werk aan de kant te zetten en de wereld (van Oracle) te verkennen. In Amsersfoort, op de Tech Experiences conferentie. </p> <p>Details over de agenda vind je op <a href="https://www.ogh.nl/techex/" target="_blank">https://www.ogh.nl/techex/</a>. Ook vind je informatie over de indrukwekkende line-up aan sprekers en details van de sessies, de locatie en het registratieformulier. De kosten voor twee dagen zijn 475 euro (en 175 euro voor leden van OGh). Twee collega&#8217;s kunnen op één inschrijving elk één van de beide dagen bijwonen. </p> <p>met vriendelijke groeten, </p> <p>Lucas Jellema </p> <p>CTO van AMIS</p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/06/02/oproep-aan-managers-van-oracle-professionals-gun-je-team-de-tech-experience-2017-15-16-juni/">Oproep aan Managers van Oracle Professionals: gun je team de Tech Experience 2017 (15 &amp; 16 juni)</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Lucas Jellema https://technology.amis.nl/?p=45063 Fri Jun 02 2017 00:23:04 GMT-0400 (EDT) Histogram Upgrade – 2 https://jonathanlewis.wordpress.com/2017/06/01/histogram-upgrade-2/ <p>While reading <a href="https://sqlmaria.com/2017/05/09/optimizer-histograms/"><em><strong>a blog post by Maria Colgan</strong></em></a> a couple of weeks ago I came across an observation about histograms that I&#8217;d not noticed before; worse still, it was a feature that seemed to make some &#8220;damage-limitation&#8221; advice I&#8217;d been giving for years a <em><strong>really bad idea</strong></em>! The threat appeared in these paragraphs:</p> <p style="padding-left:30px;"><em>Setting SIZE REPEAT ensures a histogram will only be created for any column that already has one. If the table is a partitioned table, repeat ensures a histogram will be created for a column that already has one on the global level.</em></p> <p style="padding-left:30px;"><em>What’s the down side to doing this?</em></p> <p style="padding-left:30px;"><em>The current number of buckets used in each histogram becomes the limit on the maximum number of buckets used for any histogram created in the future.</em></p> <p>Unfortunately I&#8217;ve been saying for a very long time that you have to be very careful with histograms, and should probably create then through PL/SQL code; but if you have some frequency histograms that you&#8217;re sure are going to be well-behaved then <a href="https://jonathanlewis.wordpress.com/2015/12/10/upgrades-6/"><em><strong>using &#8220;for all columns size repeat&#8221; to gather the histogram is probably okay</strong></em></a>. But after making the claim above Maria&#8217;s blog posting demonstrated the truth of the claim, a demonstration that showed the highly undesirable consequences.</p> <p>So imagine this: you create a frequency histogram which happens to produce 26 buckets on a particular column; from then on every time you run the gather with <strong><em>size repeat</em></strong> Oracle tries to generate 26 buckets. One day the data looks a little different, temporarily there are only 25 distinct values so on the next gather you get just 25 buckets &#8211; which means that when the &#8220;missing&#8221; value re-appears 12c will give you a <em><strong>Top-N</strong></em> histogram or even a <em><strong>hybrid</strong></em> histogram (11g would have to give you a <em><strong>height-balanced</strong></em> histogram if it noticed all 26 values). It is not safe to use <em><strong>size repeat</strong></em> if the number of distinct values that actually exist can vary from day to day.</p> <p>I have to say that I was fairly shocked that I&#8217;d not come across this threat before &#8211; so obviously I created a simple model to check how nasty things could get. I had a copy of 11.2.0.4 handy and created a couple of tables cloning the data from <em><strong>all_objects</strong></em> because that&#8217;s got a couple of columns that are good for producing frequency histograms.</p> <pre class="brush: plain; title: ; notranslate"> rem Script: histogram_repeat.sql rem Author: Jonathan Lewis rem Dated: June 2017 drop table t2; drop table t1; create table t1 as select * from all_objects; create table t2 as select * from t1; delete from t1 where object_type = 'EDITION'; delete from t1 where object_type = 'EVALUATION CONTEXT'; commit; pause ================ Baseline ======================================= select count(distinct object_type), count(distinct owner) from t1; execute dbms_stats.gather_table_stats(user,'t1',method_opt =&gt;'for columns object_type owner') select column_name, count(*) from user_tab_histograms where table_name = 'T1' and column_name in ( 'OBJECT_TYPE','OWNER') group by column_name order by column_name ; select column_name, num_buckets, histogram from user_tab_columns where table_name = 'T1' and column_name in ( 'OBJECT_TYPE','OWNER') order by column_name ; insert into t1 select * from t2 where object_type = 'EDITION'; insert into t1 select * from t2 where object_type = 'EVALUATION CONTEXT'; commit; </pre> <p>After creating the data I&#8217;ve deleted a few rows from <em><strong>t1</strong></em>, reported the number of distinct values in <em><strong>t1</strong></em> for <em>owner</em> and <em>object_type</em>, then gathered stats on just those two columns using the default size. I&#8217;ve then reported the number of histogram buckets in two ways, by counting them in <strong><em>user_tab_histograms</em></strong> and by reporting them directly (with histogram type) from <em><strong>user_tab_columns</strong></em>. Then I&#8217;ve finished off by re-inserting (copying from <em><strong>t2</strong></em>) the rows I previously deleted, giving me a couple more <em>object_type</em> values in the table. Here are the results of the queries:</p> <pre class="brush: plain; title: ; notranslate"> ================ Baseline ======================================= COUNT(DISTINCTOBJECT_TYPE) COUNT(DISTINCTOWNER) -------------------------- -------------------- 23 11 COLUMN_NAME COUNT(*) -------------------- ---------- OBJECT_TYPE 17 OWNER 7 COLUMN_NAME Buckets HISTOGRAM -------------------- ---------- --------------- OBJECT_TYPE 17 FREQUENCY OWNER 7 FREQUENCY </pre> <p>I&#8217;m running on 11.2.0.4 &#8211; and I have two frequency histograms that have missed a few of the distinct values. But that&#8217;s because on the default settings 11g uses sampling (typically about 5,500 rows for smaller data sets) when creating histograms. So re-running the gather with <em><strong>size repeat</strong></em> shouldn&#8217;t allow the number of buckets to grow. Here&#8217;s what I got when I re-ran the gather (with size repeat) and two queries a further three times</p> <pre class="brush: plain; title: ; notranslate"> method_opt =&gt;'for columns object_type size repeat owner size repeat' ================ Repeat 1 ======================================= COLUMN_NAME COUNT(*) -------------------- ---------- OBJECT_TYPE 16 OWNER 9 COLUMN_NAME Buckets HISTOGRAM -------------------- ---------- --------------- OBJECT_TYPE 16 FREQUENCY OWNER 9 FREQUENCY ================ Repeat 2 ======================================= COLUMN_NAME COUNT(*) -------------------- ---------- OBJECT_TYPE 18 OWNER 8 COLUMN_NAME Buckets HISTOGRAM -------------------- ---------- --------------- OBJECT_TYPE 18 FREQUENCY OWNER 8 FREQUENCY ================ Repeat 3 ======================================= COLUMN_NAME COUNT(*) -------------------- ---------- OBJECT_TYPE 13 OWNER 9 COLUMN_NAME Buckets HISTOGRAM -------------------- ---------- --------------- OBJECT_TYPE 13 FREQUENCY OWNER 9 FREQUENCY </pre> <p>On the first repeat I got even fewer buckets; but on the second repeat the number of buckets bounced back up and even exceeded the original count; then on the third repeat the number of buckets dropped significantly. If you run the test your results will probably vary, but that&#8217;s the effect of the random selection of rows used to generate the histogram. Key point, though, the number of buckets generated by the gather <span style="text-decoration:underline;"><strong>is not limited by the current number of buckets</strong></span>.</p> <h3>But&#8230;</h3> <p>What happens with 12.1.0.2 &#8211; here are the results. Remember I deleted two sets of <em>object_type</em> before I gathered the first set of stats, then put them back in before doing the repeat gathers. (The number of distinct <em>object_types</em> in 12c is more than I had in 11g).</p> <pre class="brush: plain; title: ; notranslate"> ================ Baseline ======================================= COUNT(DISTINCTOBJECT_TYPE) COUNT(DISTINCTOWNER) -------------------------- -------------------- 27 25 COLUMN_NAME COUNT(*) -------------------- ---------- OBJECT_TYPE 27 OWNER 25 COLUMN_NAME NUM_BUCKETS HISTOGRAM -------------------- ----------- --------------- OBJECT_TYPE 27 FREQUENCY OWNER 25 FREQUENCY ================ Repeat 1 ======================================= COLUMN_NAME COUNT(*) -------------------- ---------- OBJECT_TYPE 27 OWNER 25 COLUMN_NAME NUM_BUCKETS HISTOGRAM -------------------- ----------- --------------- OBJECT_TYPE 27 TOP-FREQUENCY OWNER 25 FREQUENCY ================ Repeat 2 ======================================= COLUMN_NAME COUNT(*) -------------------- ---------- OBJECT_TYPE 27 OWNER 25 COLUMN_NAME NUM_BUCKETS HISTOGRAM -------------------- ----------- --------------- OBJECT_TYPE 27 TOP-FREQUENCY OWNER 25 FREQUENCY ================ Repeat 3 ======================================= COLUMN_NAME COUNT(*) -------------------- ---------- OBJECT_TYPE 27 OWNER 25 COLUMN_NAME NUM_BUCKETS HISTOGRAM -------------------- ----------- --------------- OBJECT_TYPE 27 TOP-FREQUENCY OWNER 25 FREQUENCY </pre> <p>The number of distinct values for <em>object_type</em> is initially 27, but after gathering stats the first time I added back two more <em>object_type</em> values; but the subsequent gathers stuck with 27 buckets rather than extending to 29 buckets &#8211; so the histogram changed from <em><strong>frequency</strong></em> to <em><strong>Top-N</strong></em>. If you check Maria&#8217;s blog again you&#8217;ll see that this can make a big difference, particularly if the two new values happen to be the lowest and highest values for the column.</p> <p>The number of buckets on a REPEAT is fixed by the number of existing buckets in 12c. That to me is a major change in behaviour and one you&#8217;ll have to watch out for on the upgrade. In 11g if the number of actual values stored dropped briefly the situation was self-correcting; if some new values were introduced the situation was self-correcting &#8211; although in both cases the histogram isn&#8217;t necessarily telling the truth the way you&#8217;d like it. In 12c the situation <em><strong>doesn&#8217;t self-correct</strong></em>. and may introduce a massive change in the arithmetic (as shown in Maria&#8217;s example).</p> <p>The big difference, of course, is that 12c is gathering on a 100% sample using the variation of the <a href="https://jonathanlewis.wordpress.com/2009/03/20/hotsos-2009/"><strong><em>approximate_ndv</em></strong></a> mechanism &#8211; so it will always find the right number of values if a frequency histogram is appropriate: presumably this is what was suppposed to make it okay to reproduce the number of buckets previously used. In 11g with its small sample size the number of buckets created couldn&#8217;t be guaranteed to match the number of distinct values, so I guess the code in 11g wasn&#8217;t written to be so rigorous in its assumption about the number of buckets to use next time.</p> <h3>tl;dr</h3> <p>When you upgrade from 11g to 12c think very carefully about whether or not you can still use a &#8220;table-level&#8221; <strong><em>size repeat</em></strong> to gather histograms &#8211; the upgrade may force you to identify specifically the columns that need histograms so that you can name with with an explicit (large enough) size in gather command.</p> <p>&nbsp;</p><br /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jonathanlewis.wordpress.com/17215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jonathanlewis.wordpress.com/17215/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=jonathanlewis.wordpress.com&#038;blog=491988&#038;post=17215&#038;subd=jonathanlewis&#038;ref=&#038;feed=1" width="1" height="1" /> Jonathan Lewis http://jonathanlewis.wordpress.com/?p=17215 Thu Jun 01 2017 13:00:47 GMT-0400 (EDT) Kscope Ambassador Program http://www.odtug.com/p/bl/et/blogaid=722&source=1 The Kscope Ambassador Program is back!  You’re already attending the sessions, so why not take an opportunity to assist with the conference and make a difference? ODTUG http://www.odtug.com/p/bl/et/blogaid=722&source=1 Thu Jun 01 2017 09:00:53 GMT-0400 (EDT) Oracle REST Data Services and Docker http://feedproxy.google.com/~r/KrisBlog/~3/OzlS2PMY1RQ/oracle-rest-data-services-and-docker.html TL;DR 1) check out https://github.com/krisrice/docker-ords-sqlcl-apex 2) Download ORDS ; optionally SQLcl,APEX 3) Build w/DB connection details docker build -t krisrice/ords:3.0.10 --build-arg DBHOST=192.168.3.119 --build-arg DBSERVICE=orcl --build-arg DBPORT=1521 --build-arg DBPASSWD=oracle . 4) Run the image docker run -d -p 8888:8888 -p 8443:8443 --name=ords krisrice/ords:3.0.10 5) Access <div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/KrisBlog?a=OzlS2PMY1RQ:MlDPWZah37E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KrisBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KrisBlog?a=OzlS2PMY1RQ:MlDPWZah37E:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/KrisBlog?d=7Q72WNTAKBA" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/KrisBlog/~4/OzlS2PMY1RQ" height="1" width="1" alt=""/> Kris Rice tag:blogger.com,1999:blog-37621059.post-2084061909244191320 Thu Jun 01 2017 08:49:00 GMT-0400 (EDT) LEAP#315 MT3608 Variable Boost Converter http://blog.tardate.com/2017/06/leap315-mt3608-variable-boost-converter.html <p>The MT3608 (also known as B628) is a very efficient boost converter that can deliver up to 24V at 4A. It requires only 6 external passive components, and is readily available as a complete module for as little as $0.40. For this test, I built the standard variable converter circuit from scratch and evaluated its performance. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/SwitchModePowerSupplies/MT3608/VariableBoost">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/SwitchModePowerSupplies/MT3608/VariableBoost"><img src="http://leap.tardate.com/Electronics101/SwitchModePowerSupplies/MT3608/VariableBoost/assets/VariableBoost_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/06/leap315-mt3608-variable-boost-converter.html Thu Jun 01 2017 07:42:00 GMT-0400 (EDT) Avoiding Coincidental Cohesion http://radiofreetooting.blogspot.com/2017/05/avoiding-coincidental-cohesion.html Given that Coincidental Cohesion is bad for our code base so obviously we want to avoid writing utilities packages. Fortunately it is mostly quite easy to do so. It requires vigilance on our part. Utilities packages are rarely planned. More often we are writing a piece of business functionality when we find ourselves in need of some low level functionality. It doesn't fit in the application package we're working on, perhaps we suspect that it might be more generally useful, so we need somewhere to put it. <p><br/>The important thing is to recognise and resist the temptation of the Utilities package. The name itself (and similarly vague synonyms like helper or utils) should be a red flag. When we find ourselves about to type <code>create or replace package utilities</code> we need to stop and think: what would be a better name for this package? Consider whether there are related functions we might end up needing? Suppose we're about to write a function to convert a date into Unix epoch string. It doesn't take much imagine to think we might need a similar function to convert a Unix timestamp into a date. We don't need to write that function now but let's start a package dedicated to Time functions instead of a miscellaneous utils package. <p><br/>Looking closely at <a href="DBMS_Utility 12cR2 https://docs.oracle.com/database/122/ARPLS/DBMS_UTILITY.htm">the programs which comprise the <code>DBMS_UTILITY</code> package</a> it is obviously unfair to describe them as a random selection. In fact that there seven or eight groups of related procedures. <p><br/><b>DB Info</b><br/><ul><li><code>INSTANCE_RECORD</code> Record Type</li><li><code>DBLINK_ARRAY</code> Table Type</li><li><code>INSTANCE_TABLE</code> Table Type</li><li><code>ACTIVE_INSTANCES</code> Procedure</li> <li><code>CURRENT_INSTANCE</code> Function</li> <li><code>DATA_BLOCK_ADDRESS_BLOCK</code> Function</li> <li><code>DATA_BLOCK_ADDRESS_FILE</code> Function</li> <li><code>DB_VERSION</code> Procedure</li> <li><code>GET_ENDIANNESS</code> Function</li> <li><code>GET_PARAMETER_VALUE</code> Function</li><li><code>IS_CLUSTER_DATABASE</code> Function</li> <li><code>MAKE_DATA_BLOCK_ADDRESS</code> Function</li> <li><code>PORT_STRING</code> Function</li> </ul><b>Runtime Messages</b><br/><ul><li><code>FORMAT_CALL_STACK</code> Function</li> <li><code>FORMAT_ERROR_BACKTRACE</code> Function</li> <li><code>FORMAT_ERROR_STACK</code> Function</li> </ul><b>Object Management</b><br/><ul><li><code>COMMA_TO_TABLE</code> Procedures</li> <li><code>COMPILE_SCHEMA</code> Procedure</li> <li><code>CREATE_ALTER_TYPE_ERROR_TABLE</code> Procedure</li> <li><code>INVALIDATE</code> Procedure</li> <li><code>TABLE_TO_COMMA</code> Procedures</li> <li><code>VALIDATE</code> Procedure</li> </ul><b>Object Info (Object Management?)</b><br/><ul><li><code>INDEX_TABLE_TYPE</code> Table Type</li><li><code>LNAME_ARRAY</code> Table Type</li><li><code>NAME_ARRAY</code> Table Type</li><li><code>NUMBER_ARRAY</code> Table Type</li><li><code>UNCL_ARRAY</code> Table Type</li><li><code>CANONICALIZE</code> Procedure</li><li><code>GET_DEPENDENCY</code> Procedure</li> <li><code>NAME_RESOLVE</code> Procedure</li><li><code>NAME_TOKENIZE</code> Procedure</li></ul><b>Session Info</b><br/><ul><li><code>OLD_CURRENT_SCHEMA</code> Function</li> <li><code>OLD_CURRENT_USER</code> Function</li> </ul><b>SQL Manipulation</b><br/><ul><li><code>EXPAND_SQL_TEXT</code> Procedure</li> <li><code>GET_SQL_HASH</code> Function</li> <li><code>SQLID_TO_SQLHASH</code> Function</li> </ul><b>Statistics</b> (deprecated))<br/><ul><li><code>ANALYZE_DATABASE</code> Procedure</li><li><code>ANALYZE_PART_OBJECT</code> Procedure</li> <li><code>ANALYZE_SCHEMA</code> Procedure</li> </ul><b>Time</b><br/><ul><li><code>GET_CPU_TIME</code> Function</li> <li><code>GET_TIME</code> Function</li> <li><code>GET_TZ_TRANSITIONS</code> Procedure</li> </ul><b>Unclassified</b><br/><ul><li><code>WAIT_ON_PENDING_DML</code> Function</li> <li><code>EXEC_DDL_STATEMENT</code> Procedure</li> <li><code>GET_HASH_VALUE</code> Function</li> <li><code>IS_BIT_SET</code> Function</li> </ul><p><br/>We can see an alternative PL/SQL code suite, with several highly cohesive packages. But there will be some procedures which are genuinely unrelated to anything else. The four procedures in the <b>Unclassified</b> section above are examples. But writing a miscellaneous utils package for these programs is still wrong. There are better options. <ol><li>Find a home. It's worth considering whether we already have a package which would fit the new function. Perhaps <code>WAIT_ON_PENDING_DML()</code> should have gone in <code>DBMS_TRANSACTION</code>; perhaps <code>IS_BIT_SET()</code> properly belongs in <code>UTL_RAW</code>. <li>A package of their own. Why not? It may seem extravagant to have a package with a single procedure but <a href="https://docs.oracle.com/database/121/ARPLS/d_dg.htm#ARPLS66222">consider <code>DBMS_DG</code></a> with its lone procedure <code>INITIATE_FS_FAILOVER()</code>. The package delivers the usual architectural benefits plus it provides a natural home for related procedures we might discover a need for in the future. <li>Standalone procedure. Again, why not? We are so conditioned to think of a PL/SQL program as a package that we forget it can be just a Procedure or Function. Some programs are suited to standalone implementation. </ol> <p><br/>So avoiding the Utilities package requires vigilance. Code reviews can help here. Preventing the Utilities package becoming entrenched is crucial: once we have a number of packages dependent on a Utilities package it is pretty hard to get rid of it. And once it becomes a fixture in the code base developers will consider it more acceptable to add procedures to it. <p><br/><h2><a href="http://radiofreetooting.blogspot.com/2016/03/designing-plsql-programs-series-home.html">Part of the Designing PL/SQL Programs series</a></h2> APC tag:blogger.com,1999:blog-13000143.post-4046554028654397005 Wed May 31 2017 18:10:00 GMT-0400 (EDT) Utilities - the Coincidental Cohesion anti-pattern http://radiofreetooting.blogspot.com/2017/05/utilities-coincidental-cohesion-anti.html One way to understand the importance of cohesion is to examine an example of a non-cohesive package, one exhibiting a random level of cohesion. The poster child for Coincidental Cohesion is the utility or helper package. Most applications will have one or more of these, and Oracle's PL/SQL library is no exception. <code>DBMS_UTILITY</code> has 37 distinct procedures and functions (i.e. not counting overloaded signatures) in 11gR2 and 38 in 12cR1 (and R2). Does <code>DBMS_UTILITY</code> deliver any of the benefits the PL/SQL Reference says packages deliver? <h3>Easier Application Design?</h3> One of the characteristics of utilities packages is that they aren't designed in advance. They are the place where functionality ends up because there is no apparently better place for it. Utilities occur when we are working on some other piece of application code; we discover a gap in the available functionality such as hashing a string. When this happens we generally need the functionality <i>now</i>: there's little benefit to deferring the implementation until later. So we write a <code>GET_HASH_VALUE()</code> function,x stick it in our utilities package and proceed with the task at hand. <P>The benefit of this approach is we keep our focus on the main job, delivering business functionality. The problem is, we never go back and re-evaluate the utilities. Indeed, now there is business functionality which depends on them: refactoring utilities introduces risk. Thus the size of the utilities package slowing increases, one tactical implementation at a time. <h3>Hidden Implementation Details?</h3> Another characteristic of utility functions is that they tend not to share concrete implementations. Often a utilities package beyond a certain size will have groups of procedures with related functionality. It seems probable that <code>DBMS_UTILITY.ANALYZE_DATABASE()</code>, <code>DBMS_UTILITY.ANALYZE_PART_OBJECT()</code> and <code>DBMS_UTILITY.ANALYZE_SCHEMA()</code> share some code. So there are benefits to co-locating them in the same package. But it is unlikely that <code>CANONICALIZE()</code> , <code>CREATE_ALTER_TYPE_ERROR_TABLE()</code> and <code>GET_CPU_TIME()</code> have much code in common. <h3>Added Functionality?</h3> Utility functions are rarely part of a specific business process. They are usually called on a one-off basis rather than being chained together. So there is no state to be maintained across different function calls. <h3>Better Performance?</h3> For the same reason there is no performance benefit from a utilities package. Quite the opposite. When there is no relationship between the functions we cannot make predictions about usage. We are not likely to call <code>EXPAND_SQL_TEXT()</code> right after calling <code>PORT_STRING()</code>. So there is no benefit in loading the former into memory when we call the latter. In fact the performance of <code>EXPAND_SQL_TEXT()</code> is impaired because we have to load the whole <code>DBMS_UTILITY</code> package into the shared pool, plus it uses up a larger chunk of memory until it gets aged out. Although to be fair, in these days of abundant RAM, some unused code in the library cache need not be our greatest concern. But whichever way we bounce it, it's not a boon. <h3>Grants?</h3> Privileges on utility packages is a neutral concern. Often utilities won't be used outside the owning schema. In cases where we do need to make them more widely available we're probably granting access on some procedures that the grantee will never use. <h3>Modularity?</h3> From an architectural perspective, modularity is the prime benefit of cohesion. A well-designed library should be frictionless and painless to navigate. The problem with random assemblages like <code>DBMS_UTILITY</code> is that it's not obvious what functions it may contain. Sometimes we write a piece of code we didn't need to. <H2>The costs of utility packages</H2>Perhaps your PL/SQL code base has a procedure like this: <pre><br />create or replace procedure run_ddl<br /> ( p_stmt in varchar2)<br />is<br /> pragma autonomous_transaction;<br /> v_cursor number := dbms_sql.open_cursor;<br /> n pls_integer;<br />begin<br /> dbms_sql.parse(v_cursor, p_stmt, dbms_sql.native);<br /> n := dbms_sql.execute(v_cursor);<br /> dbms_sql.close_cursor(v_cursor);<br />exception<br /> when others then<br /> if dbms_sql.is_open(v_cursor) then<br /> dbms_sql.close_cursor(v_cursor);<br /> end if;<br /> raise;<br />end run_ddl;<br />/<br /></pre><br/>It is a nice piece of code for executing DDL statements. The autonomous_transaction pragma prevents the execution of arbitrary DML statements (by throwing <code>ORA-06519</code>), so it's quite safe. The only problem is, it re-implements <code>DBMS_UTILITY.EXEC_DDL_STATEMENT()</code>. <p><br/>Code duplication like this is a common side effect of utility packages. Discovery is hard because their program units are clumped together accidentally. Nobody sets out to deliberately re-write <code>DBMS_UTILITY.EXEC_DDL_STATEMENT()</code>, it happens because not enough people know to look in that package before they start coding a helper function. Redundant code is a nasty cost of Coincidental Cohesion. Besides the initial wasted effort of writing an unnecessary program there are the incurred costs of maintaining it, testing it, the risk of introducing bugs or security holes. Plus each additional duplicated program makes our code base a little harder to navigate. <p><br/>Fortunately there are tactics for avoiding or dealing with this. Find out more. <p><br/><h2><a href="http://radiofreetooting.blogspot.com/2016/03/designing-plsql-programs-series-home.html">Part of the Designing PL/SQL Programs series</a></h2> APC tag:blogger.com,1999:blog-13000143.post-8524462704033273745 Wed May 31 2017 16:42:00 GMT-0400 (EDT) How to install and configure Oracle Forms & Reports 12c fully unattended - Part 1 http://dirknachbar.blogspot.com/2017/05/how-to-install-and-configure-oracle.html Today, I will have a novelty on my blog. This blogpost is driven by a joint venture between 3 consultants based in 2 countries (Switzerland and Germany) and working for 3 different consulting companies (Robert Crames = Edorex, Jan-Peter Timmermann = AuraPlayer and myself = Trivadis).<br /><br />As we three consultants, Robert Crames (<a href="https://robertcrames.blogspot.ch/" target="_blank">https://robertcrames.blogspot.ch</a>), Jan-Peter Timmermann (<a href="https://jan-peter.me/" target="_blank">https://jan-peter.me</a>&nbsp;) and myself are intensively working with Oracle Fusion Middleware Products, which also covers Oracle Forms &amp; Reports, we’re stumbling over following problem with Oracle Forms &amp; Reports 12c:<br /><br /><ul><li>Missing possibility during the WebLogic Domain creation for Forms&nbsp;&amp; Reports to use a “record” Feature</li></ul>Different contacts with Oracle and researches within My Oracle Support, confirmed that the “record” feature is no longer available within Oracle Forms &amp; Reports 12c.<br />Therefore, in case you will have to create on several servers Oracle Forms &amp; Reports environments, you will need a lot of patience while clicking through the Configuration Wizard for WebLogic Domain creation. So automation is quite impossible for a complete installation and configuration ☹<br /><br />So, the joint venture (Robert, Jan-Peter and myself) we were pooling our knowledge and created a script set for “How to install and configure an Oracle Forms &amp; Reports 12c environment completely unattended and silent”.<br /><span style="font-size: 12pt;"><span style="font-family: &quot;calibri&quot;; font-size: x-small;"><span style="font-size: 11pt;"><br /></span></span></span>Here I will present the first part:<br /><ul><li>Installation of JDK</li><li>Installation of Oracle WebLogic Server Infrastructure 12.2.1.2.0</li><li>Installation of Oracle Forms &amp; Reports 12.2.1.2.0</li></ul>The above steps are requiring following files:<br /><ul><li>setLocalEnv.sh</li><ul><li>here we define all necessary values for the installation, e.g. ORACLE_BASE, JDK Release, ORACLE_HOME and so on</li></ul><li>silent_jdk.sh</li><ul><li>installs under the Oracle Software Owner a private JDK</li></ul><li>silent_wls_infra.sh</li><ul><li>Install the Oracle WebLogic Server Infrastructure 12.2.1.2.0</li><li>Requires setLocalEnv.sh, oraInst.loc and response_file_wls_infra.rsp</li></ul><li>silent_forms.sh</li><ul><li>Installs the Oracle Forms &amp; Reports 12.2.1.2.0 over the prior installed Oracle WebLogic Server Infrastructure</li><li>Requires setLocalEnv.sh, oraInst.loc and response_file_forms.rsp</li></ul></ul>Place the following files all under one directory, e.g. /u00/app/oracle/install.<br /><br /><br />Download the required Oracle Software Installation sources and place them as well in the same directory as the script set<br /><ul><li>JDK 1.8 <a href="http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html" target="_blank">http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html</a></li><li>Oracle WebLogic Server Infrastructure 12.2.1.2.0 <a href="http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html" target="_blank">http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html</a></li><li>Oracle Forms &amp; Reports 12.2.1.2.0 <a href="http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html" target="_blank">http://www.oracle.com/technetwork/developer-tools/forms/downloads/index.html</a></li></ul>First lets have a quick look on the setLocalEnv.sh. I will just explain the for now required variables, the remaining variables will be described in Robert’s Blogpost<br /><br />For the first steps, we need to have a look on following environment variables in the setLocalEnv.sh <br /><ul><li>JDK_SOURCE: here we define the JDK installation source file (tar.gz)</li><li>JDK_REL: is the JDK Release, the syntax is for JDK 8 = 1.8.0_&lt;updateversion&gt;</li><li>ORACLE_BASE: defines our ORACLE_BASE</li><li>INT_ORACLE_HOME: defines our target ORACLE_HOME</li><li>The remaining variables will be explained in Robert's second Blogpost</li></ul><pre class="brush:bash"># Location to the directory in which the create Domain scripts are residing<br />export SCRIPT_HOME=$PWD<br /><br />export JDK_SOURCE=jdk-8u131-linux-x64.tar.gz<br />export JDK_REL=1.8.0_131<br /><br /># Directories<br />export ORACLE_BASE=/appl/oracle<br />export INT_ORACLE_HOME=$ORACLE_BASE/product/fmw-fr-12.2.1.2.0<br />export WL_HOME=$INT_ORACLE_HOME/wlserver<br />export WLST_HOME=$INT_ORACLE_HOME/oracle_common/common/bin<br />export MW=$INT_ORACLE_HOME<br />export DOMAIN_BASE=$ORACLE_BASE/user_projects/domains<br />export APPLICATION_BASE=$ORACLE_BASE/user_projects/applications<br />export APP_VZ=$APPLICATION_BASE<br /><br /># install forms true / false<br />export FORMS12C=true<br /># install reports true / false<br />export REPORTS12C=true<br /># install OHS true / false<br />export WEBTIER12C=true<br />export OHS_COMPONENTNAME=ohs1<br />export OHS_LISTENPORT=7777<br />export OHS_SSLPORT=4443<br /><br /># Domain specific<br />export TEMPLATE=$WL_HOME/common/templates/wls/wls.jar<br />export DOMAIN_NAME=FRTEST<br /><br /># AdminServer<br />export AS_NAME=FRTESTAdminServer<br />export ADM_USER=weblogic<br />export ADM_PWD=welcome1<br />export ADMINPORT=7001 <br />export ADMINPORTSSL=7101<br />export AS_HOST=`hostname -f`<br /><br /># Name and Port for the Forms Managed Server<br />export FORMS_MS_NAME=MS_FORMS<br />export FORMS12C_MS_PORT=9001<br /><br /># Name and Port for the Reports Managed Server<br />export REPORTS_MS_NAME=MS_REPORTS<br />export REPORTS12C_MS_PORT=9002<br /><br /># Move Reports Application into WLS_FORMS (true or false)<br />export REPORTS_IN_FORMS=false<br /><br /># NodeManager<br />export NM_LISTENADDRESS=`hostname -f`<br />export NM_TYPE=SSL<br />export NM_PORT=5556<br />export NM_USERNAME=nodemanager<br />export NM_PWD=welcome1<br /><br /># Repository Connect<br />export DBUSER=sys<br />export DBPWD=<br />export DBROLE=SYSDBA<br />export COMPONENTPWD=<br />export SCHEMA_PREFIX=$DOMAIN_NAME<br />export DB_HOST=<br />export DB_PORT=<br />export DB_SERVICE=<br />export DB_OMF=true<br />export DB_USER_PW=welcome1<br />export PWDFILE=$SCRIPT_HOME/passwords.txt<br /></pre><br />The first script to execute is the silent_jdk.sh, this script simply unpacks the JDK under the defined $ORACLE_BASE/product/jdk$JDK_REL <br />silent_jdk.sh<br /><br /><pre class="brush:bash">#!/bin/bash<br />#=====================================================================<br />#<br /># $Id: silent_jdk.sh $<br />#<br /># PURPOSE: Script to install JDK<br />#<br /># PARAMETERS: none<br />#<br /># NOTES: setLocalEnv.sh must be present and aligned<br />#<br /># AUTHOR: Dirk Nachbar, https://dirknachbar.blogspot.com<br />#<br /># MODIFIED:<br />#<br />#<br />#=====================================================================<br /><br />source setLocalEnv.sh<br /><br />mkdir -p ${ORACLE_BASE}/product/<br />cp ${JDK_SOURCE} ${ORACLE_BASE}/product/<br />cd ${ORACLE_BASE}/product/<br />gunzip ${JDK_SOURCE}<br />tar -xvf ${JDK_SOURCE}<br />rm ${ORACLE_BASE}/product/${JDK_SOURCE}<br /></pre><br /><br />The next step is to install the Oracle WebLogic Server Infrastructure 12.2.1.2.0, here we are using the silent installation option with a response file and an oraInst.loc file<br /><br />silent_wls_infra.sh<br /><br /><pre class="brush:bash">#!/bin/sh<br />#=====================================================================<br />#<br /># $Id: silent_wls_infra.sh $<br />#<br /># PURPOSE: Script to install WebLogic Infrastructure<br />#<br /># PARAMETERS: none<br />#<br /># NOTES: setLocalEnv.sh must be present and aligned<br />#<br /># AUTHOR: Dirk Nachbar, https://dirknachbar.blogspot.com<br />#<br /># MODIFIED:<br />#<br />#<br />#=====================================================================<br /><br />source setLocalEnv.sh<br /><br />export JAVA_HOME=${ORACLE_BASE}/product/jdk${JDK_REL}<br />export PATH=$JAVA_HOME/bin:$PATH<br /><br />java -jar fmw_12.2.1.2.0_infrastructure.jar -silent -responseFile ${SCRIPT_HOME}/response_file_wls_infra.rsp -jreLoc ${JAVA_HOME} -invPtrLoc ${SCRIPT_HOME}/oraInst.loc<br /><br /></pre><br />The referenced response file for the silent_wls_infra.sh Installation script looks as follows <br />response_file_wls_infra.rsp<br /><br /><pre class="brush:bash">[ENGINE]<br />#DO NOT CHANGE THIS.<br />Response File Version=1.0.0.0.0<br />[GENERIC]<br />#Set this to true if you wish to skip software updates<br />DECLINE_AUTO_UPDATES=true<br />#My Oracle Support User Name<br />MOS_USERNAME=<br />#My Oracle Support Password<br />MOS_PASSWORD=&lt;SECURE VALUE&gt;<br />#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true<br />AUTO_UPDATES_LOCATION=<br />#Proxy Server Name to connect to My Oracle Support<br />SOFTWARE_UPDATES_PROXY_SERVER=<br />#Proxy Server Port<br />SOFTWARE_UPDATES_PROXY_PORT=<br />#Proxy Server Username<br />SOFTWARE_UPDATES_PROXY_USER=<br />#Proxy Server Password<br />SOFTWARE_UPDATES_PROXY_PASSWORD=&lt;SECURE VALUE&gt;<br />#The oracle home location. This can be an existing Oracle Home or a new Oracle Home<br />ORACLE_HOME=/appl/oracle/product/fmw-fr-12.2.1.2.0<br />#Set this variable value to the Installation Type selected. e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure With Examples.<br />INSTALL_TYPE=Fusion Middleware Infrastructure<br />#Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name.<br />MYORACLESUPPORT_USERNAME=<br />#Provide the My Oracle Support Password<br />MYORACLESUPPORT_PASSWORD=&lt;SECURE VALUE&gt;<br />#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration<br />DECLINE_SECURITY_UPDATES=true<br />#Set this to true if My Oracle Support Password is specified<br />SECURITY_UPDATES_VIA_MYORACLESUPPORT=false<br />#Provide the Proxy Host<br />PROXY_HOST=<br />#Provide the Proxy Port<br />PROXY_PORT=<br />#Provide the Proxy Username<br />PROXY_USER=<br />#Provide the Proxy Password<br />PROXY_PWD=&lt;SECURE VALUE&gt;<br />#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]<br />COLLECTOR_SUPPORTHUB_URL=<br /></pre><br />The referenced oraInst.loc file for the silent_wls_infra.sh Installation script looks as follows <br />oraInst.loc <br /><pre class="brush:bash">inst_group=oinstall<br />inventory_loc=/u00/app/oracle/oraInventory</pre><br />The last step is to install the Oracle Forms &amp; Reports 12.2.1.2.0 components over the prior installed Oracle WebLogic Server Infrastructure 12.2.1.2.0.<br />With this step is one speciality, I am replacing the originally provided frmconfighelper.sh script with my modified version described in my Blogpost <a href="https://dirknachbar.blogspot.ch/2017/05/oracle-forms-12c-frmconfighelper.html" target="_blank">https://dirknachbar.blogspot.ch/2017/05/oracle-forms-12c-frmconfighelper.html</a> <br /><br />For this installation step we are using the silent_forms.sh, which is referencing a corresponding response file and the same oraInst.loc as we used before for the Oracle WebLogic Server Infrastructure installation <br /><br />silent_forms.sh<br /><br /><pre class="brush:bash">#!/bin/sh<br />#=====================================================================<br />#<br /># $Id: silent_forms.sh $<br />#<br /># PURPOSE: Script to install Oracle Forms and Reports<br /># on top of existing WebLogic Server Infrastructure Installation<br />#<br /># PARAMETERS: none<br />#<br /># NOTES: setLocalEnv.sh must be present and aligned<br /># Modified frmconfighelper.sh will be provided<br /># with more functions<br />#<br /># AUTHOR: Dirk Nachbar, https://dirknachbar.blogspot.com<br />#<br /># MODIFIED:<br />#<br />#<br />#=====================================================================<br /><br />source setLocalEnv.sh<br /><br />export JAVA_HOME=${ORACLE_BASE}/product/jdk${JDK_REL}<br /><br />./fmw_12.2.1.2.0_fr_linux64.bin -silent -responseFile ${SCRIPT_HOME}/response_file_forms.rsp -jreLoc ${JAVA_HOME} -invPtrLoc ${SCRIPT_HOME}/oraInst.loc<br /><br />mv ${MW}/forms/provision/frmconfighelper.sh ${MW}/forms/provision/frmconfighelper.sh.org<br />cp ${SCRIPT_HOME}/frmconfighelper.sh ${MW}/forms/provision/<br />chmod +x ${MW}/forms/provision/frmconfighelper.sh<br /><br /></pre><br />The referenced response file response_file_forms.rsp for the silent_forms.sh Installation script looks as follows <br /><br /><pre class="brush:bash">[ENGINE]<br />#DO NOT CHANGE THIS.<br />Response File Version=1.0.0.0.0<br />[GENERIC]<br />#Set this to true if you wish to skip software updates<br />DECLINE_AUTO_UPDATES=true<br />#My Oracle Support User Name<br />MOS_USERNAME=<br />#My Oracle Support Password<br />MOS_PASSWORD=&lt;SECURE VALUE&gt;<br />#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true<br />AUTO_UPDATES_LOCATION=<br />#Proxy Server Name to connect to My Oracle Support<br />SOFTWARE_UPDATES_PROXY_SERVER=<br />#Proxy Server Port<br />SOFTWARE_UPDATES_PROXY_PORT=<br />#Proxy Server Username<br />SOFTWARE_UPDATES_PROXY_USER=<br />#Proxy Server Password<br />SOFTWARE_UPDATES_PROXY_PASSWORD=&lt;SECURE VALUE&gt;<br />#The oracle home location. This can be an existing Oracle Home or a new Oracle Home<br />ORACLE_HOME=/u00/app/oracle/product/fmw-fr-12.2.1.2.0<br />#Set this variable value to the Installation Type selected as either Standalone Forms Builder OR Forms and Reports Deployment<br />INSTALL_TYPE=Forms and Reports Deployment<br /></pre><br />Putting all together, just create all the above described files into one directory on your Linux Server, e.g. /u00/app/oracle/install. Make the *.sh scripts executable (chmod&nbsp;+x *.sh) and execute them in following order:<br /><pre class="brush:bash">cd /u00/app/oracle/install<br />chmod +x *.sh<br />./silent_jdk.sh<br />./silent_wls_infra.sh<br />./silent_forms.sh<br /></pre><br />Now, you have the base for the next steps, described by Robert Crames in his Blogpost <a href="http://robertcrames.blogspot.ch/2017/05/how-to-install-and-configure-oracle.html" target="_blank">http://robertcrames.blogspot.ch/2017/05/how-to-install-and-configure-oracle.html</a><br /><br />After you are done with reading and applying Robert’s Part, stay tuned for my next Blogpost “How to automate Multiple Managed Servers for Oracle Forms”<br /><br /><br /> Dirk Nachbar tag:blogger.com,1999:blog-4344684978957885806.post-7494378479093040074 Wed May 31 2017 13:48:00 GMT-0400 (EDT) BGOUG Spring 2017 : The Journey Begins http://feedproxy.google.com/~r/TheOracleBaseBlog/~3/6qUtImdnuKM/ <p><a href="http://www.bgoug.org/en"><img class="size-full wp-image-7166 alignleft" src="https://oracle-base.com/blog/wp-content/uploads/2017/05/bgoug.jpg" alt="" width="235" height="67" /></a>Waking up at 03:00 is stupid! When I wake at this sort of hour I tend to feel kind-of sick unless I&#8217;m distracted. Fortunately the taxi driver was pretty cool, which helped me forget about how miserable I felt. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>You never know what you are going to get at the airport. Last time the queues were massive, but fortunately I had fluked a business class ticket so I walked straight past them. This time the security was empty, so I walked straight through, even with my economy ticket. That&#8217;s great, but you start to kid yourself you could have come an hour later and slept some more. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>The first flight of the day was from Birmingham to Amsterdam. The plane had a lot of free space, so boarding was quick. We left on time and the flight took about 40 minutes.</p> <p>A connection time of a little over a hour can sometimes be a problem in Amsterdam. It&#8217;s a big airport and if you catch the gates wrong, it can be a bit of a panic to get to your connection. This time my departure gate was next to the arrival gate.</p> <p>I wrote a lengthy bitch about the airport and the lead up to the next flight, but it was because I was tired and emotional. Actually it was fine.</p> <p>The next flight went well. It took about 2.5 hours to get form Amsterdam to Sofia and ended with possibly the best landing I&#8217;ve ever experienced.</p> <p><iframe src="https://www.youtube.com/embed/wykIJGvXm2U" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p> <p>I was met at the airport by Todor Grigorov, who took me to my hotel. I&#8217;ll be spending tomorrow with him and his team at <a href="https://www.dxc.technology/">DXC Technology</a> doing a free form Q&amp;A. It&#8217;s like a job interview with 40+ people on the panel, and no job at the end of it. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/05/31/bgoug-spring-2017-the-journey-begins/">BGOUG Spring 2017 : The Journey Begins</a> was first posted on May 31, 2017 at 5:26 pm.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /><img src="http://feeds.feedburner.com/~r/TheOracleBaseBlog/~4/6qUtImdnuKM" height="1" width="1" alt=""/> Tim... https://oracle-base.com/blog/?p=7165 Wed May 31 2017 12:26:10 GMT-0400 (EDT) LEAP#314 AT28C EEPROM Programmer with Port Expander http://blog.tardate.com/2017/05/leap314-at28c-eeprom-programmer-with-port-expander.html <p>The AT28C16 is an old-school 2k x 8-bit parallel EEPROM. Since it has parallel addressing and data lines, it opens a whole range of possibilities with discrete logic circuits (i.e. no SPI or I²C in sight). I was inspired to explore more by <a href="https://youtu.be/K88pgWhEb1M">Ben Eater’s use of EEPROMs for his 8-bit computer build</a>. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/playground/EEPROM/AT28C16/PEProgrammer">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/playground/EEPROM/AT28C16/PEProgrammer"><img src="http://leap.tardate.com/playground/EEPROM/AT28C16/PEProgrammer/assets/PEProgrammer_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap314-at28c-eeprom-programmer-with-port-expander.html Wed May 31 2017 09:59:26 GMT-0400 (EDT) एक और सुनो http://ezsaid.blogspot.com/2017/05/blog-post_30.html ashish tag:blogger.com,1999:blog-14142302.post-3567444855893113848 Wed May 31 2017 01:26:00 GMT-0400 (EDT) LEAP#313 MCP23S17 Port Expander http://blog.tardate.com/2017/05/leap313-mcp23s17-port-expander.html <p>The Microchip MCP23S17 is a 16-bit port expender that can be controlled for example from an Arduino over SPI (MCP23017 is the I²C variant). It supports digital input and output on all pins, and interrupts can be configured if required. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/MCP23S17">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a></p> <iframe class="youtube-embed" src="https://www.youtube.com/embed/CuNJYUojNe0" frameborder="0" allowfullscreen=""></iframe> <p><a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/MCP23S17"><img src="http://leap.tardate.com/Electronics101/MCP23S17/assets/MCP23S17_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap313-mcp23s17-port-expander.html Tue May 30 2017 08:37:37 GMT-0400 (EDT) JDev/ADF sample - ADF PopUp Event Context Launcher http://andrejusb-samples.blogspot.com/2017/05/jdevadf-sample-adf-popup-event-context.html <div dir="ltr" style="text-align: left;" trbidi="on"><ul><li><a href="http://andrejusb.blogspot.lt/2017/05/adf-popup-event-context-launcher.html" target="_blank">ADF PopUp Event Context Launcher</a>. I will describe how you could use ADF popup event context to pass parameters into popup. This could beeful if you want to develop reusable popup, which should accept different type of parameters from various launcher components.</li></ul><ol>Download - <a href="https://docs.google.com/uc?export=download&amp;id=0Bw_kr1_tXc-eeVNjQXhBUFY2NEk">PopUpEventContextApp.zip</a></ol></div> Andrejus Baranovskis tag:blogger.com,1999:blog-4301764760924839143.post-566689619688120614 Tue May 30 2017 03:35:00 GMT-0400 (EDT) Enterprise Linux Upgrade : It’s a Sorry State! https://oracle-base.com/blog/2017/05/30/enterprise-linux-upgrade-its-a-sorry-state/ <p><img class="alignright wp-image-7158" src="https://oracle-base.com/blog/wp-content/uploads/2017/05/penguin-158551_640.png" alt="" width="150" height="154" />It&#8217;s 2017 and it&#8217;s still not possible to reliably upgrade an Enterprise Linux distribution between major versions!</p> <p>At this point you are scrolling down to the comments to &#8220;educate me&#8221; about the <a href="https://access.redhat.com/solutions/637583">redhat-upgrade-tool</a>, because you read about it somewhere and you once heard someone successfully upgraded an installation on a lab machine. Unless you have an ultra vanilla starting point, you are going to end up with a mess that probably won&#8217;t boot. By the time you come to upgrade a &#8220;real server&#8221;, there have been years of changes and it is unlikely to resemble some pristine minimal installation.</p> <p>I know your next comment is going to be something about the architectural changes brought in by project X and version Y in RHEL7, which is why it is all so hard. Stop now! You are boring me already! Is it an enterprise distribution or isn&#8217;t it? If it is, you should be able to upgrade it reliably!</p> <p>Next up comes, &#8220;But you have to reinstall when you get new hardware!&#8221; I present to you virtual machines. Physical hardware upgrades with no need to reinstall the OS on the VM.</p> <p>I can&#8217;t believe I&#8217;ve been using Linux for about 19 years and this is where we are at.</p> <p>Cheers</p> <p>Tim&#8230;</p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/05/30/enterprise-linux-upgrade-its-a-sorry-state/">Enterprise Linux Upgrade : It&#8217;s a Sorry State!</a> was first posted on May 30, 2017 at 7:54 am.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /> Tim... https://oracle-base.com/blog/?p=7157 Tue May 30 2017 02:54:52 GMT-0400 (EDT) एक और शेर http://ezsaid.blogspot.com/2017/05/blog-post_29.html ashish tag:blogger.com,1999:blog-14142302.post-8982520608523870539 Tue May 30 2017 01:55:00 GMT-0400 (EDT) 12.2 Index Deferred Invalidation (Atomica) https://richardfoote.wordpress.com/2017/05/30/12-2-index-deferred-invalidation-atomica/ One of the useful little features quietly introduced with Oracle Database 12c Release 2 is the ability to now defer the invalidation of dependent SQL cursors when an index is created or modified. This can be useful when you say create a new index which you know will have no impact on any existing SQL [&#8230;]<img alt="" border="0" src="https://pixel.wp.com/b.gif?host=richardfoote.wordpress.com&#038;blog=2301564&#038;post=4531&#038;subd=richardfoote&#038;ref=&#038;feed=1" width="1" height="1" /> Richard Foote http://richardfoote.wordpress.com/?p=4531 Mon May 29 2017 21:14:47 GMT-0400 (EDT) LEAP#312 Matrix Firecracker http://blog.tardate.com/2017/05/leap312-matrix-firecracker.html <p>I was a bit dubious about the possibility of creating a decent firecracker animation on the 24x5 Matrix display. The additional PWM settings create another dimension, so the simulacrum is perhaps not so far off the mark. To light the firecracker, I want to use a real fire of course;-) As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/TheMatrix/Firecracker">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a></p> <iframe class="youtube-embed" src="https://www.youtube.com/embed/0L34ye-Hupc" frameborder="0" allowfullscreen=""></iframe> <p><a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/TheMatrix/Firecracker"><img src="http://leap.tardate.com/BoldportClub/TheMatrix/Firecracker/assets/Firecracker_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap312-matrix-firecracker.html Mon May 29 2017 07:35:10 GMT-0400 (EDT) Configuring Oracle Traffic Director 12c with WebGate https://technology.amis.nl/2017/05/28/configuring-oracle-traffic-director-12c-with-webgate/ <p>At a recent customer install, I was faced with configuring Oracle Traffic Director (OTD) 12.2.1.2.0 Webgate with Oracle Access Manager.</p> <p>Deploying Webgate on OD 12c is very well described in the documentation. See <a href="https://docs.oracle.com/middleware/12212/otd/install/GUID-EFC43C1A-858A-43A3-8E1E-840926BE4F2C.htm#OTINS870" target="_blank" rel="noopener noreferrer">A Configuring OAM Agent (WebGate) for Oracle Traffic Director 12.2.1.2</a></p> <p>There is however a flaw in the documentation. I came across that when I reached the point where Webgate get&#8217;s configured in the conf files of OTD.</p> <p>When you configure Webgate for OTD 12c, the OTD Conf files such as magnus.conf and virtual-server-*-obj.conf are updated. (on a collocated installation)<br /> If you follow the documentation completely, you will end up with conf files that either have no WebGate configuration in them or with the configuration dedicated to the first OTD instance on both servers. In the latter case, the second instance will no longer start.<br /> I created a Service Request at Oracle support to address the issue. They didn&#8217;t have a solution for the problem and I ended up being bounced between the OTD and the WebGate support teams. Finally one of the guys from the WebGate team really tried to help me, but couldn&#8217;t resolve the issue. So I went along and solved the problem myself. As I will describe below.</p> <p>When you reach pt.5 of the documentation <a href="https://docs.oracle.com/middleware/12212/otd/install/GUID-EFC43C1A-858A-43A3-8E1E-840926BE4F2C.htm#OTINS1003" target="_blank" rel="noopener noreferrer">A.2 Configuring Oracle Traffic Director 12c WebGate</a></p> <p>Change the EditObjConf line as follows</p> <pre class="brush: bash; title: ; notranslate">./EditObjConf -f Domain_Home/config/fmwconfig/components/ OTD/otd_configuration_name/config/virtual_server_name-obj.conf -w webgate_instanceDirectory [-oh Oracle_Home] -ws otd</pre> <p>For example</p> <p>OTD Configuration Name: TST1<br /> OTD Instance 1: otd_TST1_host1.domain.local<br /> OTD Instance 2: otd_TST1_ host1.domain.local<br /> Domainhome: /u01/app/oracle/config/domains/otd_domain_tst</p> <pre class="brush: bash; title: ; notranslate">./EditObjConf -f /u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/ OTD/TST1/config/virtual-server-tst1-obj.conf -w /u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/ OTD/instances/otd_TST1_ host1.domain.local -oh $ORACLE_HOME -ws otd</pre> <p>Where TST1 is the name of the configuration and host1.domain.local is the name of the first server.<br /> This will change the magnus.conf and virtual-server-tst1-obj.conf for Webgate.<br /> In virtual-server-tst1-obj.conf there are no instance specific references.<br /> However in the magnus.conf there are references to the first instance, since this is the one that we used with EditObjConf.</p> <p>This is what the magnus.conf in the OTD configuration section (on global level) looks like after EditObjConf command.<br /> Notice the hardcoded instance name in four places.</p> <pre class="brush: bash; title: ; notranslate">less /u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/ OTD/TST1/config/magnus.conf&amp;amp;amp;lt;/pre&amp;amp;amp;gt; # # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # Init fn=&quot;load-modules&quot; shlib=&quot;libwebapp-firewall.so&quot; # Oracle WebGate Init FNs start #WGINITFN Init fn=&quot;load-modules&quot; funcs=&quot;OBWebGate_Init,OBWebGate_Authent,OBWebGate_Control, OBWebGate_Err,OBWebGate_Handle401, OBWebGate_Response&quot; shlib=&quot;/u01/app/oracle/product/otd1221/webgate/otd/lib/webgate.so&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/ components/OTD/instances/otd_TST1_host1.domain.local&quot; #ESSO#Init fn=&quot;load-modules&quot; funcs=&quot;EssoBasicAuthInit,EssoBasicAuth,EssoClean&quot; shlib=&quot;/u01/app/oracle/product/otd1221/webgate/otd/lib/webgate.so&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/ components/OTD/instances/otd_TST1_host1.domain.local&quot; Init fn=&quot;OBWebGate_Init&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/ components/OTD/instances/otd_TST1_host1.domain.local&quot; Mode=&quot;PEER&quot; #WebGateLockFileDir=&quot;&amp;amp;amp;amp;lt;some_local_dir&amp;amp;amp;amp;gt;&quot; # WebGateLockFileDir: Optional directive specifying the location to create # webgate lock files. # # If configured, then all webgate lock files will be created under # &amp;amp;amp;amp;lt;WebGateLockFileDir&amp;amp;amp;amp;gt;/&amp;amp;amp;amp;lt;Hash of WebGateInstancedir&amp;amp;amp;amp;gt;. The hash subdir is to # ensure uniqueness for each webserver instance and avoid locking conflicts # if two different instances have configured the directive with same value. # # If the dir does not exist before, will try to create it first. If dir # creation failed or the directive not configured, webgate falls back to old # model, i.e. use same location as original file that lock is based upon. # # This directive is useful when webgate instance is located on NFS mounted # disks and performance greatly impacted. Configure it to local dir will solve # the issue. #ESSO#Init fn=&quot;EssoBasicAuthInit&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/ components/OTD/instances/otd_TST1_host1.domain.local&quot; Mode=&quot;PEER&quot; # Oracle WebGate Init FNs end #WGINITFN </pre> <p>Leaving it like this will result in this hardcoded instance name being distributed to all instance. Hence only one instance would start.</p> <h3>Now how to fix this.</h3> <p>Open magnus.conf with an editor</p> <p>Replace the hardcoded instance name with a variable called ${INSTANCE_NAME}<br /> (I picked up the existence of this variable in the server.xml which is also on the OTD Configuration level and get distributed all instances.)</p> <p>In our example the magnus.conf now looks like this.</p> <pre class="brush: bash; title: ; notranslate"># # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. #&amp;amp;amp;lt;/pre&amp;amp;amp;gt; Init fn=&quot;load-modules&quot; shlib=&quot;libwebapp-firewall.so&quot; # Oracle WebGate Init FNs start #WGINITFN Init fn=&quot;load-modules&quot; funcs=&quot;OBWebGate_Init,OBWebGate_Authent,OBWebGate_Control, OBWebGate_Err,OBWebGate_Handle401,OBWebGate_Response&quot; shlib=&quot;/u01/app/oracle/product/otd1221/webgate/otd/lib/webgate.so&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/${INSTANCE_NAME}&quot; #ESSO#Init fn=&quot;load-modules&quot; funcs=&quot;EssoBasicAuthInit,EssoBasicAuth,EssoClean&quot; shlib=&quot;/u01/app/oracle/product/otd1221/webgate/otd/lib/webgate.so&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/${INSTANCE_NAME}&quot; Init fn=&quot;OBWebGate_Init&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/${INSTANCE_NAME}&quot; Mode=&quot;PEER&quot; #WebGateLockFileDir=&quot;&amp;amp;amp;amp;lt;some_local_dir&amp;amp;amp;amp;gt;&quot; # WebGateLockFileDir: Optional directive specifying the location to create # webgate lock files. # # If configured, then all webgate lock files will be created under # &amp;amp;amp;amp;lt;WebGateLockFileDir&amp;amp;amp;amp;gt;/&amp;amp;amp;amp;lt;Hash of WebGateInstancedir&amp;amp;amp;amp;gt;. The hash subdir is to # ensure uniqueness for each webserver instance and avoid locking conflicts # if two different instances have configured the directive with same value. # # If the dir does not exist before, will try to create it first. If dir # creation failed or the directive not configured, webgate falls back to old # model, i.e. use same location as original file that lock is based upon. # # This directive is useful when webgate instance is located on NFS mounted # disks and performance greatly impacted. Configure it to local dir will solve # the issue. #ESSO#Init fn=&quot;EssoBasicAuthInit&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/${INSTANCE_NAME}&quot; Mode=&quot;PEER&quot; # Oracle WebGate Init FNs end #WGINITFN </pre> <h3>Now to distributed these files</h3> <p>Open Enterprise ManagerFusion Middleware Control 12c and go to the OTD Configuration</p> <p><img class="alignnone" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/otdem1.png?resize=635%2C96&#038;ssl=1" alt="" data-recalc-dims="1" /></p> <p>Go to Virtual Server section and click Lock and Edit</p> <p>EM will show the Pull Components Changes bar.</p> <p><img src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/otdem2.png?resize=635%2C46&#038;ssl=1" alt="" data-recalc-dims="1" /></p> <p><strong>DON&#8217;T pull the changes!</strong><br /> This will replace the conf files of the configuration with those currently in use by the instances.</p> <p>Instead make a minor, insignificant, change in the configuration.<br /> For example add a hostname to the Virtual Server Settings. (We remove it later)<br /> Now activate the changes<br /> <strong>Again, don’t Pull the changes</strong></p> <p><img src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/otdem3.png?resize=213%2C240&#038;ssl=1" alt="" data-recalc-dims="1" /></p> <p><img src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/otdem4.png?resize=635%2C365&#038;ssl=1" alt="" data-recalc-dims="1" /></p> <p>Discard the Instance Changes and Activate Changes.</p> <p><img src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/otdem5.png?resize=635%2C142&#038;ssl=1" alt="" data-recalc-dims="1" /></p> <p>Again Discard Changes</p> <p><img src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/otdem6.png?resize=627%2C157&#038;ssl=1" alt="" data-recalc-dims="1" /></p> <p>And finally Discard Changes to distributed the correct conf files to the instances.</p> <p>Now let&#8217;s look at the magnus.conf on both instances. (We already know that the virtual-server-tst1-obj.conf is the same everywhere)</p> <p><strong>On Instance 1</strong></p> <pre class="brush: bash; title: ; notranslate"># # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. #&amp;amp;lt;/pre&amp;amp;gt; Init fn=&quot;load-modules&quot; shlib=&quot;libwebapp-firewall.so&quot; # Oracle WebGate Init FNs start #WGINITFN Init fn=&quot;load-modules&quot; funcs=&quot;OBWebGate_Init,OBWebGate_Authent,OBWebGate_Control, OBWebGate_Err,OBWebGate_Handle401,OBWebGate_Response&quot; shlib=&quot;/u01/app/oracle/product/otd1221/webgate/otd/lib/webgate.so&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/ components/OTD/instances/otd_TST1_host1.domain.local&quot; #ESSO#Init fn=&quot;load-modules&quot; funcs=&quot;EssoBasicAuthInit,EssoBasicAuth,EssoClean&quot; shlib=&quot;/u01/app/oracle/product/otd1221/webgate/otd/lib/webgate.so&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/otd_TST1_host1.domain.local&quot; Init fn=&quot;OBWebGate_Init&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/otd_TST1_host1.domain.local&quot; Mode=&quot;PEER&quot; #WebGateLockFileDir=&quot;&amp;amp;amp;lt;some_local_dir&amp;amp;amp;gt;&quot; # WebGateLockFileDir: Optional directive specifying the location to create # webgate lock files. # # If configured, then all webgate lock files will be created under # &amp;amp;amp;lt;WebGateLockFileDir&amp;amp;amp;gt;/&amp;amp;amp;lt;Hash of WebGateInstancedir&amp;amp;amp;gt;. The hash subdir is to # ensure uniqueness for each webserver instance and avoid locking conflicts # if two different instances have configured the directive with same value. # # If the dir does not exist before, will try to create it first. If dir # creation failed or the directive not configured, webgate falls back to old # model, i.e. use same location as original file that lock is based upon. # # This directive is useful when webgate instance is located on NFS mounted # disks and performance greatly impacted. Configure it to local dir will solve # the issue. #ESSO#Init fn=&quot;EssoBasicAuthInit&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/otd_TST1_host1.domain.local&quot; Mode=&quot;PEER&quot; # Oracle WebGate Init FNs end #WGINITFN </pre> <p><strong>And on Instance 2</strong></p> <pre class="brush: bash; title: ; notranslate"># # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. #&amp;amp;lt;/pre&amp;amp;gt; Init fn=&quot;load-modules&quot; shlib=&quot;libwebapp-firewall.so&quot; # Oracle WebGate Init FNs start #WGINITFN Init fn=&quot;load-modules&quot; funcs=&quot;OBWebGate_Init,OBWebGate_Authent,OBWebGate_Control, OBWebGate_Err,OBWebGate_Handle401,OBWebGate_Response&quot; shlib=&quot;/u01/app/oracle/product/otd1221/webgate/otd/lib/webgate.so&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/otd_TST1_host2.domain.local&quot; #ESSO#Init fn=&quot;load-modules&quot; funcs=&quot;EssoBasicAuthInit,EssoBasicAuth,EssoClean&quot; shlib=&quot;/u01/app/oracle/product/otd1221/webgate/otd/lib/webgate.so&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/otd_TST1_host2.domain.local&quot; Init fn=&quot;OBWebGate_Init&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/otd_TST1_host2.domain.local&quot; Mode=&quot;PEER&quot; #WebGateLockFileDir=&quot;&amp;amp;amp;lt;some_local_dir&amp;amp;amp;gt;&quot; # WebGateLockFileDir: Optional directive specifying the location to create # webgate lock files. # # If configured, then all webgate lock files will be created under # &amp;amp;amp;lt;WebGateLockFileDir&amp;amp;amp;gt;/&amp;amp;amp;lt;Hash of WebGateInstancedir&amp;amp;amp;gt;. The hash subdir is to # ensure uniqueness for each webserver instance and avoid locking conflicts # if two different instances have configured the directive with same value. # # If the dir does not exist before, will try to create it first. If dir # creation failed or the directive not configured, webgate falls back to old # model, i.e. use same location as original file that lock is based upon. # # This directive is useful when webgate instance is located on NFS mounted # disks and performance greatly impacted. Configure it to local dir will solve # the issue. #ESSO#Init fn=&quot;EssoBasicAuthInit&quot; obinstalldir=&quot;/u01/app/oracle/product/otd1221/webgate/otd&quot; obinstancedir=&quot;/u01/app/oracle/config/domains/otd_domain_tst/config/fmwconfig/components/OTD/instances/otd_TST1_host2.domain.local&quot; Mode=&quot;PEER&quot; # Oracle WebGate Init FNs end #WGINITFN </pre> <p>The files look good on both instances.</p> <p>Now Restart Instances</p> <pre class="brush: bash; title: ; notranslate">Validate Restart operation on target /Domain_otd_domain_tst/otd_domain_tst/otd_TST1_host2.domain.local Validate Restart operation on target /Domain_otd_domain_tst/otd_domain_tst/otd_TST1_host1.domain.local ------------------------------------------------ Perform Restart operation on target /Domain_otd_domain_tst/otd_domain_tst/TST1 Perform Restart operation on target /Domain_otd_domain_tst/otd_domain_tst/otd_TST1_host2.domain.local Perform Restart operation on target /Domain_otd_domain_tst/otd_domain_tst/otd_TST1_host1.domain.local ------------------------------------------------ Checking operation status on target /Domain_otd_domain_tst/otd_domain_tst/TST1 Operation Restart on target /Domain_otd_domain_tst/otd_domain_tst/otd_TST1_host2.domain.local succeeded Operation Restart on target /Domain_otd_domain_tst/otd_domain_tst/otd_TST1_host1.domain.local succeeded </pre> <p>&nbsp;</p> <p>Now you&#8217;re good to go with WebGate correctly configured on OTD 12c.</p> <p>I put the solution in the service request and got thanks from the guys at Oracle Support. They told me, they where going to change the documentation to match my solution. Always nice to get this kind of appreciation from them.</p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/05/28/configuring-oracle-traffic-director-12c-with-webgate/">Configuring Oracle Traffic Director 12c with WebGate</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Jaap Poot https://technology.amis.nl/?p=45041 Sun May 28 2017 16:01:46 GMT-0400 (EDT) LEAP#311 The Boldport Club Juice http://blog.tardate.com/2017/05/leap311-the-boldport-club-juice.html <p>Juice is a battery replacement kit that uses a pretty nifty set of AA, AAA, A23 and CR2032 inserts to inject the required regulated power where a battery or two would normally be required. Power can be supplied via the micro USB connector, or any other power supply that can be clipped or screwed on to the body of the Juice. All the structural parts punch out from the classy PCB like a model plane kit;-) The box folds up and doubles as a “Juice box”. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/Juice">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/Juice"><img src="http://leap.tardate.com/BoldportClub/Juice/assets/Juice_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap311-the-boldport-club-juice.html Sun May 28 2017 03:48:42 GMT-0400 (EDT) Being a Beginner Again (OBIEE, ODI, OBIA) https://oracle-base.com/blog/2017/05/27/being-a-beginner-again-obiee-odi-obia/ <p><img class="wp-image-7069 alignright" src="https://oracle-base.com/blog/wp-content/uploads/2017/04/frog-48234_640.png" alt="" width="150" height="162" />Things have been a little quite on the blog front recently, because work has been crazy. I keep being asked to do stuff I&#8217;ve never done before and it makes life really hard.</p> <p>I hate being crap at stuff, and I don&#8217;t like to do things at work that I&#8217;ve not already done at home, so when something new is thrown at me it I put a lot of pressure on myself to get up to speed as quickly as possible.</p> <p>I wrote a few weeks ago about doing some <a href="https://oracle-base.com/blog/2017/04/10/obiee-and-odi-12c-silent-installations-first-steps/">OBIEE 12c and ODI 12c installations</a>, which was a way of giving me a little understanding about these products. I spent last weekend doing the 11g equivalents of those articles. Currently Oracle Cloud Apps are only certified with the 11g stack, so it&#8217;s into the time machine to do old crap*, which I find hard to get excited about. Having done all that I felt a little better prepared, but was still kind-of nervous. My inferiority complex always has me thinking, perhaps this will be the thing that breaks me!</p> <p>This last week we spent three days with a consultant doing OBIEE, ODI and OBIA 11g installations. I did everything, with him guiding the process and one of my colleagues observing and correcting my typos. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> I wrote down all the instructions, did screen shots of everything and captured all response files where they were available. Yesterday I spent the day going through the notes trying to make the process <del>silent</del> quiet. We are going to do about 4 of these environments, so scripting is really important, but I&#8217;m not going to waste my life trying to make it completely silent. There are some config stages that are going to be super fiddly to script, so we&#8217;ve decided to go for a halfway approach to the build process, with a combination of scripts and manual actions.</p> <p>The OBIEE and ODI 11g stuff I did at home is already on the website, but I won&#8217;t be adding any of the extra stuff I did this week because:</p> <ul> <li>I did it on company time, not on my own time.</li> <li>Although the basic installs are easy and obvious, some of the &#8220;threading together&#8221; is a little funky and it would have taken a lot longer than 3 days if we hadn&#8217;t had the consultant on site. I&#8217;m not going to publish what is effectively his company&#8217;s documentation and pass it off as my own.</li> <li>I think for most people this will be seen as rather old stuff.</li> </ul> <p>At some point we will have to move the whole environment to the 12c Fusion Middleware stack. At that point I may well do it all myself at home, write it up and put it on the website. If we have to rely on external consultancy and company time for that again, same rules will apply.</p> <p>I&#8217;m glad I did all the prep work during the weeks leading up to this, as it made the whole process a lot easier. It was good to focus on the bits that were awkward, rather than having to waste time discussing basics.</p> <p>Overall, I was happy with the process. It didn&#8217;t break me! <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>I&#8217;ll be away in Bulgaria next week, back for a week to do more BI stuff at work, then off to the Netherlands for a few days. After that, normal service should resume&#8230; <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>Cheers</p> <p>Tim&#8230;</p> <p>* I&#8217;m referring to the fact it is the 11g version, rather than the 12c version. I&#8217;m not saying it is crap because it is OBIEE+ODI+OBIA, rather than some &#8220;cool&#8221; stuff. <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <hr style="border-top:black solid 1px" /><a href="https://oracle-base.com/blog/2017/05/27/being-a-beginner-again-obiee-odi-obia/">Being a Beginner Again (OBIEE, ODI, OBIA)</a> was first posted on May 27, 2017 at 11:53 am.<br />©2012 "<a href="http://www.oracle-base.com/blog">The ORACLE-BASE Blog</a>". Use of this feed is for personal non-commercial use only. If you not reading this article in your feed reader, then the site is guilty of copyright infringement.<br /> Tim... https://oracle-base.com/blog/?p=7153 Sat May 27 2017 06:53:37 GMT-0400 (EDT) Virtualizing Big Data in the Cloud http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/ <div id="tweetbutton6802" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fdbakevlar.com%2F2017%2F05%2Fvirtualizing-big-data-cloud%2F&amp;text=RT%20%40DBAKevlar%20%40DBAKevlar%20%3A&amp;related=DBAKevlar:DBA+Kevlar&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdbakevlar.com%2F2017%2F05%2Fvirtualizing-big-data-cloud%2F" class="twitter-share-button" style="width:55px;height:22px;background:transparent url('http://dbakevlar.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat 0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><div class="pf-content"><p>I&#8217;m in sunny Phoenix this week at the <a href="https://www.dataplatforms.com/">Data Platforms 2017</a> Conference and looking forward to a break in the heat when I return to Colorado this evening.</p> <p><a href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/overheated/" rel="attachment wp-att-6803"><img class="alignnone size-full wp-image-6803" src="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/overheated.gif?resize=500%2C207" alt="" data-recalc-dims="1" /></a></p> <p>As this event is for big data, I expected to present on how big data could benefit from virtualization, but was surprised to find that I didn&#8217;t have a lot of luck finding customers utilizing us for this reason, (yet).  As I&#8217;ve discussed in previous presentations, I was aware of what a &#8220;swiss army knife&#8221; virtualization is, resolving numerous issues, across a myriad of environments, yet often unidentified.</p> <h2>The Use Case</h2> <p>To find my use case, I went out to the web and found a great article, &#8220;<a href="https://source.opennews.org/articles/case-flat-files-big-data-projects/">The Case for Flat Files in Big Data Projects</a>&#8220;, by Time.com interactive graphics editor, Chris Wilson.  The discussion surrounds the use of data created as part of ACA and used for another article, &#8220;<a href="http://time.com/3453649/doctors-drug-company-search-tool/">How Much Money Does Your Doctor Get From Medical Companies</a>&#8220;.  The data in the interactive graphs that are part of the article is publicly available from cms.gov and the Chris discusses the challenges created by it and how they overcame it.</p> <p><a href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/screen-shot-2017-05-26-at-11-42-22-am/" rel="attachment wp-att-6815"><img class="alignnone size-large wp-image-6815" src="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.42.22-AM.png?resize=600%2C173" alt="" srcset="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.42.22-AM.png?resize=1024%2C296 1024w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.42.22-AM.png?resize=300%2C87 300w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.42.22-AM.png?resize=768%2C222 768w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.42.22-AM.png?w=1462 1462w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.42.22-AM.png?w=1200 1200w" sizes="(max-width: 600px) 100vw, 600px" data-recalc-dims="1" /></a></p> <p>Upon reading it, there was a clear explanation of why Chris&#8217; team did what they did to consume the data in a way that complimented their skill set.  It resonated with anyone who works in any IT shop and how we end up with technical choices that we&#8217;re left to justify later on.  While observing conversations at the conference this week, I lost count of how often I accepted the fact that there wasn&#8217;t a &#8220;hadoop&#8221; shop or a &#8220;hive&#8221; shop, but everyone had a group of varied solutions that resulted in their environment and if you didn&#8217;t have it, don&#8217;t count it out-  Pig, Python, Kafka or others could show up tomorrow.</p> <p>This results in a more open and accepting technical landscape, which I, a &#8220;legacy data store&#8221; technologist, was welcome.  When I explained my upcoming talk and my experience, no one turned up their nose at any technology I admitted to having an interest in.</p> <p>With the use case found online, was also the <a href="https://www.cms.gov/OpenPayments/Explore-the-Data/Dataset-Downloads.html">data</a>.  As part of the policies in the ACA, cms.gov site, (The Center for Medicare and Medicaid) you can get access to all of this valuable data and it can offer incredible insight into these valuable programs.  The Time article only focuses on the payments to doctors from medical companies, but the data that is collected, separated out by area and then zipped up by year, is quite extensive, but as noted by a <a href="https://www.propublica.org/article/our-first-dive-into-the-new-open-payments-system">third article</a>, as anticipated as the data was, it was cumbersome and difficult to use.</p> <h2>The Requirements</h2> <p>I proceeded to take this use case and imagine it as part of an agile environment, with this data as part of the pipeline to produce revenue by providing information to the consumer.  What would be required and how could virtualization not only enhance what Chris Wilson&#8217;s team had built, but how could the entire pipeline benefit from <a href="https://www.delphix.com/">Delphix&#8217;s &#8220;swiss army knife&#8221;</a> approach?</p> <ol> <li> I can&#8217;t assume this is the main data store.  These flat files are a supplement to legacy data stores.</li> <li>There would be a standard development environment-  development and testing would need their own environments, not just a production copy of these files, applications, etc.</li> <li>If it&#8217;s providing data to a consumer and data is in perpetual motion in the age of the internet, an agile development method would need to be in place, which means a short development cycle with many, small, &#8220;scrum like&#8221; development groups from different departments working on tasks.</li> <li>Automation and seamless deployment would assist in less human intervention and resource demands, along with more successful deployments.</li> </ol> <h2>Solution</h2> <p>There were four areas that I focused to solve and eliminate bottlenecks that I either experienced or foresaw an organization experiencing when having this data as part of their environment.</p> <ol> <li>Eliminate the need to have multiple copies of the files, slow and manual process to propagate files to targets for development, test, etc. with Delphix&#8217;s vFile option, this would include any applications or other non-relational database tier included in the scenario.</li> <li>Eliminate any legacy data stores copies and refreshes that big data was dependent from and create VDBs for all development, test and reporting.</li> <li>Protect all non-production environments by masking non-production databases and flat files.</li> <li>Containerize environments for easy deployment, delivery, testing and cloud migrations.</li> </ol> <h3>vFiles</h3> <p>Each of the files, compressed were just over 500M and uncompressed, 15-18G.  This took about over 4 minutes per file to transfer to a host and could add up to considerable space.</p> <p>I used Delphix vFile to virtualize files.  This means that there is a single, &#8220;gold copy&#8221; host of the files at the Delphix engine and then there&#8217;s an NFS Mount that &#8220;projects&#8221; the file access to each target, which can be used for unique copies to as many development, test and reporting copies.</p> <p><a href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/screen-shot-2017-05-24-at-6-25-37-pm/" rel="attachment wp-att-6819"><img class="alignnone size-large wp-image-6819" src="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-24-at-6.25.37-PM.png?resize=600%2C292" alt="" srcset="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-24-at-6.25.37-PM.png?resize=1024%2C499 1024w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-24-at-6.25.37-PM.png?resize=300%2C146 300w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-24-at-6.25.37-PM.png?resize=768%2C374 768w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-24-at-6.25.37-PM.png?w=1200 1200w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-24-at-6.25.37-PM.png?w=1800 1800w" sizes="(max-width: 600px) 100vw, 600px" data-recalc-dims="1" /></a></p> <h6><em>Fig. 1- Creating vFiles from dSource that flat files are sourced on.</em></h6> <p>If a refresh is required, then the parent is refreshed and an automated refresh to all the &#8220;children&#8221; can be performed.  Changes can be made at the child level and if catastrophic, Delphix would allow for easy recovery, allowing for <strong><em>data version control</em></strong>, not just code version control throughout the development and testing process.</p> <p><a href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/screen-shot-2017-05-26-at-11-14-01-am/" rel="attachment wp-att-6808"><img class="alignnone size-large wp-image-6808" src="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.01-AM.png?resize=600%2C308" alt="" srcset="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.01-AM.png?resize=1024%2C526 1024w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.01-AM.png?resize=300%2C154 300w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.01-AM.png?resize=768%2C395 768w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.01-AM.png?w=1358 1358w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.01-AM.png?w=1200 1200w" sizes="(max-width: 600px) 100vw, 600px" data-recalc-dims="1" /></a></p> <h6><em>Fig. 2- Demonstration of target vFile, showing NFS Mount, files available, (created in less than 10 seconds) and how easily disabled and proven to be &#8220;Projection&#8221; of files.</em></h6> <p>Its a pretty cool feature and one that is very valuable to the big data arena.  I heard countless stories of how often, due to lack of storage, data scientists and developers were taking subsets of data to test and then once to production, find out that their code wouldn&#8217;t complete or fail when presented against the full data.  Having the ability to have the FULL files without taking up more space for multiple environments would be incredibly beneficial and shorten development cycles.</p> <h3>Virtualize</h3> <p>Most big data shops are still dependent on legacy data stores.  These are legendary roadblocks due to their size, complexity and demands for refreshes.  I proposed that those be virtualized so that each developer could have a copy and instant refresh without storage demands to again, ease development deadline pressures and allow for full access of data towards the development success.</p> <h3>Protect</h3> <p>Most people know we mask relational databases, but did you know we have <a href="https://docs.delphix.com/docs/delphix-masking/masking-engine-user-guide/understand-and-manage-the-masking-engine/file-masking/flat-file-masking">Agile Data Masking</a> for  flat files?  If these files are going to be pushed to non-production systems, especially with as much as we&#8217;re starting to hear about GDPR, (General Data Protection Regulations) from the EU in the US now, shouldn&#8217;t we mask outside of the database?</p> <p>What kind of files can be masked?</p> <ul> <li>Multi-record</li> <li>CSV</li> <li>XML</li> <li>Word</li> <li>Excel</li> <li>PowerPoint</li> <li>Unstructured</li> <li>EDI</li> </ul> <p>Thats a pretty considerable and cool list.  The ability to go in and mask data from flat files is a HUGE benefit to big data folks.  Many of them were looking at file security from the permissions and encryption level, so the ability to render the data benign to risk is a fantastic improvement.</p> <h3>Containerize</h3> <p>The last step is in simple recognition that big data is complex and consists of a ton of moving parts.  To acknowledge how much is often home built, open source, consisting of legacy data stores, flat files, application and other dependent tiers, should be expected.</p> <p><a href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/screen-shot-2017-05-26-at-11-34-54-am/" rel="attachment wp-att-6810"><img class="alignnone size-large wp-image-6810" src="https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.34.54-AM.png?resize=600%2C226" alt="" srcset="https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.34.54-AM.png?resize=1024%2C385 1024w, https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.34.54-AM.png?resize=300%2C113 300w, https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.34.54-AM.png?resize=768%2C289 768w, https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.34.54-AM.png?w=1200 1200w, https://i0.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.34.54-AM.png?w=1800 1800w" sizes="(max-width: 600px) 100vw, 600px" data-recalc-dims="1" /></a></p> <h6><em>Fig. 3- A Container, created on-prem, then moved to the cloud and to as many environments as required for the development cycle to meet the business needs.</em></h6> <p>Delphix has the ability to create templates of our sources, (aka dSources) which is nothing more than creating a container.  In my use case enhancement, I took all of these legacy data stores, applications, (including any Ajax code) flat files and then create a template from it for simple refreshes, deployments via jenkins, Chef jobs or other DevOps automation.  The ability to then take these templates and deploy them to the cloud would make a migration from on-prem to the cloud a simpler process or from one cloud vendor to another.</p> <p><a href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/screen-shot-2017-05-26-at-11-14-36-am/" rel="attachment wp-att-6807"><img class="alignnone size-large wp-image-6807" src="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.36-AM.png?resize=600%2C257" alt="" srcset="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.36-AM.png?resize=1024%2C439 1024w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.36-AM.png?resize=300%2C129 300w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.36-AM.png?resize=768%2C329 768w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.36-AM.png?w=1526 1526w, https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-26-at-11.14.36-AM.png?w=1200 1200w" sizes="(max-width: 600px) 100vw, 600px" data-recalc-dims="1" /></a></p> <h6><em>Fig. 4- A look at the full scenario-  Delphix engines masking files, databases, creating containers and deploying it all on-prem and to the cloud.</em></h6> <p>The end story is that this use case could be any big data shop or start up in the world today.  So many of these companies are hindered by data and Delphix virtualization could easily let their data move at the speed of business.</p> <p>I want to thank <a href="https://www.dataplatforms.com/">Data Platforms 2017</a> and all the people who were so receptive of my talk.  If you&#8217;d like access to the slide deck, it&#8217;s been <a href="https://www.slideshare.net/kellynpotvin/data-platforms-2017">uploaded to Slideshare</a>. I had a great time in Phoenix and hope I can come back soon!</p> <p>&nbsp;</p> <p>&nbsp;</p> <!-- Easy Plugin for AdSense Unfiltered [count: 3 is not less than 3] --></div><br><br><img src="https://i2.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/ico-tag.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> Tags:&nbsp;&nbsp;<a href="http://dbakevlar.com/tag/big-data/" rel="tag">Big Data</a>, <a href="http://dbakevlar.com/tag/delphix/" rel="tag">Delphix</a><br><br><div style="width:100%"><table align="left" width="100%" cellspacing="0" cellpadding="0" bgcolor="#f1f1f1" border="0px;"> <tbody> <tr bgcolor="#ffffff"><td align="center" width="17%" valign="top"> <span class="sb_title">Del.icio.us</span><br> <a href="http://del.icio.us/post?url=http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/&title=Virtualizing Big Data in the Cloud"> <img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/delicious.gif?w=600" border="0" align="absmiddle" data-recalc-dims="1"> </a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">Facebook</span><br> <a href="http://www.facebook.com/share.php?u=http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/"><img src="https://i0.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/facebook_icon.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">TweetThis</span><br> <a href="http://twitthis.com/twit?url=http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/&title=Virtualizing Big Data in the Cloud"><img src="https://i2.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tweet.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">Digg</span><br> <a href="http://digg.com/submit?phase=2&url=http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/&title=Virtualizing Big Data in the Cloud"><img src="https://i0.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/digg.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">StumbleUpon</span><br> <a href="http://www.stumbleupon.com/submit?url=http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/&title=Virtualizing Big Data in the Cloud"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/stumble.gif?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td></tr> </tbody></table></div><br><div style="clear:both"></div><div style="background:#EEEEEE; padding:0px 0px 0px 15px; margin:10px 0px 0px 0px;"><div style="padding:5px 0px 5px 0px;"><b>Comments:</b>&nbsp;&nbsp;<a href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/#respond">0 (Zero), Be the first to leave a reply!</a></div><br><div style="clear:both"></div><div style="padding:13px 0px 5px 0px;"><span style="border-bottom:1px dashed #003399;padding-bottom:4px;"><strong>You might be interested in this:</strong></span>&nbsp;&nbsp;<br><ul style="margin:0; padding:0; padding-top:10px; padding-bottom:5px;"><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2011/08/disaster-recovery-and-other-sacrifices/" >Disaster Recovery and Other Sacrifices</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2014/05/full-table-scan-runs-way-slower-today/" >Full table scan runs way slower today!</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2015/08/scripts-from-todays-family-coding-and-hands-on-lab-fix/" >Scripts from Today's Family Coding and Hands on Lab Fix</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2017/01/smart-home-update/" >Smart Home Update</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2011/12/solid-choices-for-oracle-tuning-on-solid-state-disk/" >Solid Choices for Oracle Tuning on Solid State Disk</a></li></ul></div></div><hr style="color:#EBEBEB" /><small>Copyright © <a href="http://dbakevlar.com">DBA Kevlar</a> [<a href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/">Virtualizing Big Data in the Cloud</a>], All Right Reserved. 2017.</small><br><p>The post <a rel="nofollow" href="http://dbakevlar.com/2017/05/virtualizing-big-data-cloud/">Virtualizing Big Data in the Cloud</a> appeared first on <a rel="nofollow" href="http://dbakevlar.com">DBA Kevlar</a>.</p> dbakevlar http://dbakevlar.com/?p=6802 Fri May 26 2017 13:41:29 GMT-0400 (EDT) How Do I Get My Charts Out of a Report? http://www.thatjeffsmith.com/archive/2017/05/how-do-i-get-my-charts-out-of-a-report/ <p>Someone asked, I have this cool report, how do I get the chart out of it? For now I&#8217;ve been taking screenshots.</p> <p>So let&#8217;s look at how you can get your Report out to HTML (and a PNG.)</p> <p>When I say HTML, I mean you have a SQL Dev report that&#8217;s generated by SQL Developer itself. I am NOT talking about <a href="http://www.thatjeffsmith.com/archive/2016/01/using-reports-to-print-clobs/" target="_blank">DBMS_OUTPUT reports</a> that you can use to physically print HTML3 code and have it render as HTML in SQL Developer.</p> <h3>The Report</h3> <p>Here&#8217;s a query I&#8217;ve used against <a href="https://untappd.com/user/thatjeffsmith" target="_blank">my UNTAPPD</a> data and turned into a not very good bar chart.</p> <div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="sql"><pre class="de1"><span class="kw1">SELECT</span> BEER<span class="sy0">,</span> abv<span class="sy0">,</span> <span class="kw1">COUNT</span><span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <span class="kw1">FROM</span> hr<span class="sy0">.</span>untappd <span class="kw1">GROUP</span> <span class="kw1">BY</span> beer<span class="sy0">,</span> abv <span class="kw1">HAVING</span> <span class="kw1">COUNT</span><span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <span class="sy0">&gt;</span> <span class="nu0">5</span> <span class="kw1">ORDER</span> <span class="kw1">BY</span> <span class="kw1">COUNT</span><span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <span class="kw1">DESC</span> fetch <span class="kw1">FIRST</span> <span class="nu0">15</span> <span class="kw1">ROWS</span> <span class="kw1">ONLY</span>;</pre></div></div></div></div></div></div></div> <p>So top 15 beers I&#8217;ve tried, based on the number of times I&#8217;ve tried them. And, I wanted to know how strong they were, to see if there was any correlation. The correlation bit is hard to see via this type of chart, that&#8217;s why I say it&#8217;s not the best report for what I want to do.</p> <p>Here&#8217;s the report as it renders INSIDE of SQL Developer.<div id="attachment_6183" style="width: 1034px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart-html1.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart-html1.png" alt="" width="1024" height="606" class="size-full wp-image-6183" /></a><p class="wp-caption-text">Axis, labels, data, all that jazz.</p></div> <p>So, how can I get this out of SQL Developer, besides taking a screenshot?</p> <p>Well, if you export it to HTML, it will also spit out a PNG of the graph itself.<br /> <div id="attachment_6184" style="width: 341px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart-html2.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart-html2.png" alt="" width="331" height="524" class="size-full wp-image-6184" /></a><p class="wp-caption-text">Right click&#8230;</p></div> <p>Then, where is it going to go?<div id="attachment_6185" style="width: 636px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart-html3.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart-html3.png" alt="" width="626" height="213" class="size-full wp-image-6185" /></a><p class="wp-caption-text">Pretty straightforward, where are we putting this file?</p></div> <p>Ok, let&#8217;s go look at our report!<div id="attachment_6186" style="width: 1084px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart-html4.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart-html4.png" alt="" width="1074" height="497" class="size-full wp-image-6186" /></a><p class="wp-caption-text">Whiz-bang?</p></div> <p>If you look at the HTML source behind your report, you&#8217;ll see the IMG tag and the chart PNG that was created. <div id="attachment_6187" style="width: 1010px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart.0.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/chart.0.png" alt="" width="1000" height="333" class="size-full wp-image-6187" /></a><p class="wp-caption-text">the raw chart image</p></div> <p>You can also get these out via the <a href="http://www.thatjeffsmith.com/archive/2013/07/sql-developer-4-0-and-the-command-line-interface-cli/" target="_blank">command-line</a>.</p> <p>Your interactive reports/charts will still work when exported to HTML <img src="https://s.w.org/images/core/emoji/2.2.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <div id="attachment_6188" style="width: 810px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/interactive-html-sqldev-report.gif"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/interactive-html-sqldev-report.gif" alt="" width="800" height="450" class="size-full wp-image-6188" /></a><p class="wp-caption-text">Whiz-bang++</p></div> <p>All this stuff I&#8217;ve just show you? Been in the tool since like version 1.5..give or take. I&#8217;ve said it before and I&#8217;ll say it again:</p> <blockquote><p> Reporting is the most powerful, least utilized feature in Oracle SQL Developer </p></blockquote> <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --> thatjeffsmith http://www.thatjeffsmith.com/?p=6182 Fri May 26 2017 10:39:31 GMT-0400 (EDT) LEAP#310 TEA5767 FM Stereo Chip http://blog.tardate.com/2017/05/leap310-tea5767-fm-stereo-chip.html <p>A couple of TEA5767 Low-power FM stereo radio chips landed in my lap. They arrived mounted on a small module board with all the essential supporting circuitry, so they should be ready to run without much external hardware. This project is a simple test drive under Arduino control. It simply skips through a selection of local FM stations and works amazingly well! As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/FM/TEA5767">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a>.</p> <iframe class="youtube-embed" src="https://www.youtube.com/embed/j-BBNMV8Iso" frameborder="0" allowfullscreen=""></iframe> <p><a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/FM/TEA5767"><img src="http://leap.tardate.com/Electronics101/FM/TEA5767/assets/TEA5767_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap310-tea5767-fm-stereo-chip.html Fri May 26 2017 10:02:46 GMT-0400 (EDT) Parallelism https://jonathanlewis.wordpress.com/2017/05/25/parallelism/ <p>Headline &#8211; if you don&#8217;t want to read the note &#8211; the <em><strong>/*+ parallel(N) */</strong></em> hint doesn&#8217;t mean a query will use parallel execution, even if there are enough parallel execution server processes to make it possible. The parallel(N) hint tells the optimizer to consider the cost of using parallel execution for each path that it examines, but ultimately the optimizer will still take the lowest cost path (bar the odd few special cases) and that path could turn out to be a serial path.</p> <p>The likelihood of parallelism appearing for a given query changes across versions of Oracle so you can be fooled into thinking you&#8217;re seeing bugs as you test new versions but it&#8217;s (almost certainly) the same old rule being applied in different circumstances. Here&#8217;s an example &#8211; which I&#8217;ll start off on 11.2.0.4:</p> <pre class="brush: plain; title: ; notranslate"> create table t1 segment creation immediate nologging as with generator as ( select rownum id from dual connect by level &lt;= 1e4 ) select rownum id, lpad(rownum,10,'0') v1, lpad('x',100,'x') padding from generator v1, generator v2 where rownum &lt;= 1e6 ; create index t1_i1 on t1(id); begin dbms_stats.gather_table_stats( ownname =&gt; user, tabname =&gt;'T1', method_opt =&gt; 'for all columns size 1' ); end; / set autotrace traceonly explain select count(v1) from t1 where id = 10 ; select /*+ parallel(4) */ count(v1) from t1 where id = 10 ; select /*+ parallel(4) full(t1) */ count(v1) from t1 where id = 10 ; set autotrace off </pre> <p>I haven&#8217;t declare the index to be unique, but it clearly could be; and it&#8217;s obvious that with 1M rows and about 120M of table a parallel full scan is probably a bad idea to acquire one row (even if you&#8217;re running Exadata!). So what do we get for the three plans &#8211; I&#8217;ll skip the predicate section &#8211; when we want to collect one row.</p> <pre class="brush: plain; title: ; notranslate"> Base plan - unhinted -------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 16 | 4 (0)| 00:00:01 | | 1 | SORT AGGREGATE | | 1 | 16 | | | | 2 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 16 | 4 (0)| 00:00:01 | |* 3 | INDEX RANGE SCAN | T1_I1 | 1 | | 3 (0)| 00:00:01 | -------------------------------------------------------------------------------------- Hinted parallel(4) -------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 16 | 4 (0)| 00:00:01 | | 1 | SORT AGGREGATE | | 1 | 16 | | | | 2 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 16 | 4 (0)| 00:00:01 | |* 3 | INDEX RANGE SCAN | T1_I1 | 1 | | 3 (0)| 00:00:01 | -------------------------------------------------------------------------------------- Hinted parallel(4) and full(t1) ---------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib | ---------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 16 | 606 (2)| 00:00:02 | | | | | 1 | SORT AGGREGATE | | 1 | 16 | | | | | | | 2 | PX COORDINATOR | | | | | | | | | | 3 | PX SEND QC (RANDOM) | :TQ10000 | 1 | 16 | | | Q1,00 | P-&gt;S | QC (RAND) | | 4 | SORT AGGREGATE | | 1 | 16 | | | Q1,00 | PCWP | | | 5 | PX BLOCK ITERATOR | | 1 | 16 | 606 (2)| 00:00:02 | Q1,00 | PCWC | | |* 6 | TABLE ACCESS FULL| T1 | 1 | 16 | 606 (2)| 00:00:02 | Q1,00 | PCWP | | ---------------------------------------------------------------------------------------------------------------- </pre> <p>In 11.2.0.4 the optimizer <em><strong>did</strong></em> consider the parallel hint when it appeared on its own &#8211; but it has compared the <em><strong>parallel(4)</strong></em> cost of 606 with the serial index cost of 4 and chosen the indexed access path. This is <b><i>not</i></b> a case of ignoring the hint, it&#8217;s an example of being fooled if you don&#8217;t know how the hint is really supposed to work.</p> <p>But here&#8217;s an interesting change that appeared in 12.2 &#8211; this time just the plan with the <em><strong>parallel(4)</strong></em> hint on its own:</p> <pre class="brush: plain; title: ; notranslate"> --------------------------------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib | --------------------------------------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 16 | 4 (0)| 00:00:01 | | | | | 1 | SORT AGGREGATE | | 1 | 16 | | | | | | | 2 | PX COORDINATOR | | | | | | | | | | 3 | PX SEND QC (RANDOM) | :TQ10001 | 1 | 16 | | | Q1,01 | P-&gt;S | QC (RAND) | | 4 | SORT AGGREGATE | | 1 | 16 | | | Q1,01 | PCWP | | | 5 | TABLE ACCESS BY INDEX ROWID BATCHED| T1 | 1 | 16 | 4 (0)| 00:00:01 | Q1,01 | PCWP | | | 6 | PX RECEIVE | | 1 | | 3 (0)| 00:00:01 | Q1,01 | PCWP | | | 7 | PX SEND HASH (BLOCK ADDRESS) | :TQ10000 | 1 | | 3 (0)| 00:00:01 | Q1,00 | S-&gt;P | HASH (BLOCK| | 8 | PX SELECTOR | | | | | | Q1,00 | SCWC | | |* 9 | INDEX RANGE SCAN | T1_I1 | 1 | | 3 (0)| 00:00:01 | Q1,00 | SCWP | | --------------------------------------------------------------------------------------------------------------------------------- </pre> <p>You get a parallel execution plan &#8211; although it starts with a serial index range scan which is operated for the new (12c) PX Selector operator that allocates a serial operation to one of the parallel execution slaves &#8211; which, approximately, is why the indexed access cost doesn&#8217;t change in this example &#8211; rather than running it through the query coordinator (QC). The serial range scan does a hash distribution (hashed by block address of the rowids it finds to avoid collisions between parallel execution slave as they do their table accesses.</p> <p>This is just one cute little trick that makes it worth looking at the upgrade to 12c &#8211; this new path is likely to be of benefit to people who had to create global (as opposed to globally partitioned) indexes on partitioned tables.</p> <p>This note was prompted by a recent twitter comment by <a href="https://timurakhmadeev.wordpress.com/"><em><strong>Timur Akhmadeev</strong></em></a> followed in short order by <a href="https://community.oracle.com/thread/4049237"><em><strong>an OTN posting</strong></em></a> that added further confusion to the problem by running Siebel &#8211; which is just one of several 3rd party products that love to configure optimizer parameters with non-standard values like: <em><strong>optimizer_index_cost_adj</strong><strong> = 1</strong></em>, or <em><strong>optimizer_mode = first_rows_10</strong></em>. (At the last update I&#8217;ve seen on the thread, there seemed to be some other reason why parallelism was being blocked.)</p> <h3>Footnote</h3> <p>In a follow-up tweet, Timue directed me to the 11.2 SQL Language Reference manual &#8211; specifically a section on the <a href="https://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements006.htm#SQLRF50801"><em><strong>Parallel Hint</strong></em></a>, asking if this was an example of a documentation bug.</p> <p>The trouble with the manuals is that sometimes they are obviously wrong, sometimes they are wrong but it&#8217;s not obvious they are wrong, sometimes they omit important information, and sometimes they are badly written and, most specfically, the writing can be ambiguous.</p> <p>Here&#8217;s an extract we could consider:</p> <p style="padding-left:30px;"><em> For <code>PARALLEL</code>, if you specify <code><span class="codeinlineitalic">integer</span></code>, then that degree of parallelism will be used for the statement.</em></p> <p>But my example above shows a <strong><em>&#8220;parallel({integer})&#8221;</em></strong> hint where we didn&#8217;t use that degree of parallelism for the statement.</p> <p>However the next two sentences read as follows:</p> <p style="padding-left:30px;"><em>If you omit <code><span class="codeinlineitalic">integer</span></code>, then the database computes the degree of parallelism. All the access paths that can use parallelism will use the specified or computed degree of parallelism.</em></p> <p>So what if the optimizer uses the degree of parallelism while calculating the lowest cost plan and ends up with a serial plan ? How comfortable would you feel saying that Oracle has <em>&#8220;used the degree of parallelism for the statement&#8221;</em>. Or would you say that the first sentence means Oracle isn&#8217;t allowed to use a serial plan even if it finds one when doing the arithmetic with the appropriate degree of parallelism.</p> <p>My call is that this is one of those ambiguous cases &#8211; the manual should say something more like:</p> <p style="padding-left:30px;"><em>For <code>PARALLEL</code>, if you specify <code><span class="codeinlineitalic">integer</span></code>, then that degree of parallelism will be used by the optimizer while calculating the best execution  plan for the statement.</em></p> <p>Even then I&#8217;m not sure that that&#8217;s a complete statement of how the hint works because when you have a full set of system statistics, or have used the <em><strong>dbms_resource_manager.calibrate_io</strong></em> mechanism to tell Oracle about the I/O capacity of the system the optimizer may do some working that says something like: <em>&#8220;the hint says degree 64, but the stats say the maximum effective degree will be 38 so I&#8217;ll calculate using 38</em>&#8221; (This type of thing happens with the<a href="https://jonathanlewis.wordpress.com/2013/07/03/maxthr-3/"><em><strong> older usage</strong></em></a> of the parallel hint with manual parallelism &#8211; I haven&#8217;t examined what happens with an automatic policy and the newer option for the hint.)</p> <p>&nbsp;</p><br /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jonathanlewis.wordpress.com/17193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jonathanlewis.wordpress.com/17193/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=jonathanlewis.wordpress.com&#038;blog=491988&#038;post=17193&#038;subd=jonathanlewis&#038;ref=&#038;feed=1" width="1" height="1" /> Jonathan Lewis http://jonathanlewis.wordpress.com/?p=17193 Thu May 25 2017 10:48:48 GMT-0400 (EDT) LEAP#309 Audio Connectors http://blog.tardate.com/2017/05/leap309-audio-connectors.html <p>Audio signals can be carried by any kind of connection, but there are some more commonly used standard connectors for audio applications. I started this project folder to collect notes on the verious connectors I use or have encountered. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/AudioConnectors">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/Electronics101/AudioConnectors"><img src="http://leap.tardate.com/Electronics101/AudioConnectors/assets/AudioConnectors_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap309-audio-connectors.html Thu May 25 2017 09:41:34 GMT-0400 (EDT) Docker, WebLogic Image on Amazon EC2 Container Service https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/ <p><strong>This blog series shows how to get started with WebLogic and Docker &#8211; in 3 different Clouds:</strong></p> <ul> <li><a href="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/">Docker and the Oracle Images</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/">Create and run a WebLogic Docker Image on a local machine and upload the WebLogic Docker Image into the Docker Hub registry</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/">WebLogic Docker Container on Oracle Container Cloud Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/">WebLogic Docker Container on Microsoft Azure Container Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/">WebLogic Docker Container on Amazon EC2 Container Service</a></li> </ul> <p>This blog is running a WebLogic Docker Container image from the Docker Hub registry on the Amazon EC2 Container Service.</p> <h2>Starting point &amp; Outline</h2> <p>Starting point for this blog is:</p> <ul> <li>A computer with a browser and MobaXterm installed</li> <li>A WebLogic Docker Container Image in a private Docker Hub repository, as described in <a href="https://technology.amis.nl/?p=44935&amp;preview=true">this blog</a></li> <li>Access to Amazon EC2</li> </ul> <p>The Amazon ECS cloud service knows the following concepts:</p> <ul> <li>Cluster: a Cluster is a set of EC2 instances (hosts) that are running the ECS container agent.</li> <li>Task: a Task definition describes how to run Docker containers in Amazon ECS. It describes the Docker image to use, CPU and memory requirements. networking, port mapping, etc. Tasks run on a Cluster.</li> <li>Service: a number of instances of a Task definition that runs simultaneously in a Cluster</li> </ul> <p>The Microsoft Azure and the Oracle Public Cloud offerings both had a clear distinction between the creation of the Container platform, and running containers on it. When you start with Amazon ECS, that is all combined into 1 wizard, where the platform (Cluster) is created and the first container that is run on that platform (Task).</p> <p>The cluster wizard uses an Amazon ECS-optimized AMI: the container agent is already installed. Making life easier <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <hr /> <p>&nbsp;</p> <h2>Create an Amazon EC2 Container Service, ECS</h2> <p>Start by logging in into your AWS console. I picked region Oregon – as it seems to be the cheapest.</p> <p><img data-attachment-id="45008" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-1-aws-console/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.1-AWS-console.png?fit=1827%2C695&amp;ssl=1" data-orig-size="1827,695" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.1 AWS console" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.1-AWS-console.png?fit=300%2C114&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.1-AWS-console.png?fit=702%2C267&amp;ssl=1" class="alignnone wp-image-45008" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.1-AWS-console.png?resize=702%2C268&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.1-AWS-console.png?resize=1024%2C390&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.1-AWS-console.png?resize=300%2C114&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.1-AWS-console.png?resize=768%2C292&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.1-AWS-console.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Click on EC2 Container Service</p> <p><img data-attachment-id="45009" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-2-aws-console-get-started/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.2-AWS-console-get-started.png?fit=1832%2C782&amp;ssl=1" data-orig-size="1832,782" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.2 AWS console get started" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.2-AWS-console-get-started.png?fit=300%2C128&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.2-AWS-console-get-started.png?fit=702%2C300&amp;ssl=1" class="alignnone size-large wp-image-45009" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.2-AWS-console-get-started.png?resize=702%2C300&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.2-AWS-console-get-started.png?resize=1024%2C437&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.2-AWS-console-get-started.png?resize=300%2C128&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.2-AWS-console-get-started.png?resize=768%2C328&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.2-AWS-console-get-started.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Click on Get started</p> <p><img data-attachment-id="45010" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-3-aws-wizard-no-repository/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.3-AWS-wizard-no-repository.png?fit=1856%2C625&amp;ssl=1" data-orig-size="1856,625" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.3 AWS wizard no repository" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.3-AWS-wizard-no-repository.png?fit=300%2C101&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.3-AWS-wizard-no-repository.png?fit=702%2C237&amp;ssl=1" class="alignnone size-large wp-image-45010" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.3-AWS-wizard-no-repository.png?resize=702%2C237&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.3-AWS-wizard-no-repository.png?resize=1024%2C345&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.3-AWS-wizard-no-repository.png?resize=300%2C101&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.3-AWS-wizard-no-repository.png?resize=768%2C259&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.3-AWS-wizard-no-repository.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Select the first option ‘Deploy a sample …’ and de-select the ‘Store container ….’ option. In our example, we don’t need a registry as we will use the WebLogic container image that we have in the Docker Hub registry.</p> <p><img data-attachment-id="45011" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-4-aws-wizard-step-1/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.4-AWS-wizard-step-1.png?fit=1002%2C958&amp;ssl=1" data-orig-size="1002,958" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.4 AWS wizard step 1" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.4-AWS-wizard-step-1.png?fit=300%2C287&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.4-AWS-wizard-step-1.png?fit=702%2C671&amp;ssl=1" class="alignnone wp-image-45011" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.4-AWS-wizard-step-1.png?resize=702%2C671&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.4-AWS-wizard-step-1.png?w=1002&amp;ssl=1 1002w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.4-AWS-wizard-step-1.png?resize=300%2C287&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.4-AWS-wizard-step-1.png?resize=768%2C734&amp;ssl=1 768w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>The above figure shows step 1 of the wizard. On this page, the Task definition is created.</p> <p>Note that the image name points to the image we stored in Docker Hub. And don’t forget to add the port mapping for port 7001! Then, click Next step.</p> <p><img data-attachment-id="45012" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-5-aws-wizard-step-2/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.5-AWS-wizard-step-2.png?fit=1007%2C626&amp;ssl=1" data-orig-size="1007,626" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.5 AWS wizard step 2" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.5-AWS-wizard-step-2.png?fit=300%2C186&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.5-AWS-wizard-step-2.png?fit=702%2C436&amp;ssl=1" class="alignnone wp-image-45012" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.5-AWS-wizard-step-2.png?resize=702%2C436&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.5-AWS-wizard-step-2.png?w=1007&amp;ssl=1 1007w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.5-AWS-wizard-step-2.png?resize=300%2C186&amp;ssl=300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.5-AWS-wizard-step-2.png?resize=768%2C477&amp;ssl=1 768w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>In this step, the Service is configured by giving it a name and configuring how many Tasks have to be run under that Service. Since we want to keep things simple, we decide to run only 1 Task under this Service. So, also no Load Balancer needed. Click Next step.</p> <p><img data-attachment-id="45013" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-6-aws-wizard-step-3/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.6-AWS-wizard-step-3.png?fit=1125%2C1021&amp;ssl=1" data-orig-size="1125,1021" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.6 AWS wizard step 3" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.6-AWS-wizard-step-3.png?fit=300%2C272&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.6-AWS-wizard-step-3.png?fit=702%2C637&amp;ssl=1" class="alignnone size-large wp-image-45013" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.6-AWS-wizard-step-3.png?resize=702%2C637&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.6-AWS-wizard-step-3.png?resize=1024%2C929&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.6-AWS-wizard-step-3.png?resize=300%2C272&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.6-AWS-wizard-step-3.png?resize=768%2C697&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.6-AWS-wizard-step-3.png?w=1125&amp;ssl=1 1125w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Here, the Cluster has to be configured, i.e. the EC2 instances that the Containers will run on. Note to pick an EC2 instance type that is sufficient to run WebLogic on. I picked t2.large, which has 2 cores and 8 GB of RAM.</p> <p>Also, we need a key pair for logging in into the EC2 instances. For generating a new key pair, click on the ‘EC2 conole’ link. That will bring you to a page for creating key pairs. I created a new one, named ‘aws-lgo-weblogic’:</p> <p><img data-attachment-id="45014" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-7-aws-wizard-step-3-create-key-pair/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.7-AWS-wizard-step-3-create-key-pair.png?fit=422%2C175&amp;ssl=1" data-orig-size="422,175" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.7 AWS wizard step 3 &#8211; create key pair" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.7-AWS-wizard-step-3-create-key-pair.png?fit=300%2C124&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.7-AWS-wizard-step-3-create-key-pair.png?fit=422%2C175&amp;ssl=1" class="alignnone wp-image-45014" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.7-AWS-wizard-step-3-create-key-pair.png?resize=306%2C127&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.7-AWS-wizard-step-3-create-key-pair.png?w=422&amp;ssl=1 422w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.7-AWS-wizard-step-3-create-key-pair.png?resize=300%2C124&amp;ssl=1 300w" sizes="(max-width: 306px) 100vw, 306px" data-recalc-dims="1" /></p> <p>Download the key and remember where you stored it: you will need it later on!</p> <p>Now, move back to the wizard page, refresh the key pair input field and select the keypair ‘aws-lgo-weblogic’:</p> <p><img data-attachment-id="45015" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-8-aws-wizard-step-3-select-key-pair/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.8-AWS-wizard-step-3-select-key-pair.png?fit=551%2C103&amp;ssl=1" data-orig-size="551,103" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.8 AWS wizard step 3 &#8211; select key pair" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.8-AWS-wizard-step-3-select-key-pair.png?fit=300%2C56&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.8-AWS-wizard-step-3-select-key-pair.png?fit=551%2C103&amp;ssl=1" class="alignnone size-full wp-image-45015" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.8-AWS-wizard-step-3-select-key-pair.png?resize=551%2C103&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.8-AWS-wizard-step-3-select-key-pair.png?w=551&amp;ssl=1 551w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.8-AWS-wizard-step-3-select-key-pair.png?resize=300%2C56&amp;ssl=1 300w" sizes="(max-width: 551px) 100vw, 551px" data-recalc-dims="1" /></p> <p>Click Review &amp; launch:</p> <p><img data-attachment-id="45016" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-9-aws-wizard-step-4-review/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.9-AWS-wizard-step-4-review.png?fit=986%2C932&amp;ssl=1" data-orig-size="986,932" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.9 AWS wizard step 4 &#8211; review" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.9-AWS-wizard-step-4-review.png?fit=300%2C284&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.9-AWS-wizard-step-4-review.png?fit=702%2C664&amp;ssl=1" class="alignnone wp-image-45016" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.9-AWS-wizard-step-4-review.png?resize=702%2C664&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.9-AWS-wizard-step-4-review.png?w=986&amp;ssl=1 986w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.9-AWS-wizard-step-4-review.png?resize=300%2C284&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.9-AWS-wizard-step-4-review.png?resize=768%2C726&amp;ssl=1 768w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Review the above page and when you’re OK with it, click ‘Launch instance &amp; run service’. That will bring you to a page where the progress of the Cluster creation is shown:</p> <p><img data-attachment-id="45017" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-10-aws-ecs-creation/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.10-AWS-ECS-creation.png?fit=826%2C786&amp;ssl=1" daata-orig-size="826,786" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.10 AWS ECS creation" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.10-AWS-ECS-creation.png?fit=300%2C285&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.10-AWS-ECS-creation.png?fit=702%2C668&amp;ssl=1" class="alignnone wp-image-45017" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.10-AWS-ECS-creation.png?resize=556%2C529&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.10-AWS-ECS-creation.png?w=826&amp;ssl=1 826w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.10-AWS-ECS-creation.png?resize=300%2C285&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.10-AWS-ECS-creation.png?resize=768%2C731&amp;ssl=1 768w" sizes="(max-width: 556px) 100vw, 556px" data-recalc-dims="1" /></p> <p>When your Cluster creation has finished, the ‘View service’ button as shown below will become visible:</p> <p><img data-attachment-id="45018" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-11-aws-ecs-creation-finished/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.11-AWS-ECS-creation-finished.png?fit=336%2C193&amp;ssl=1" data-orig-size="336,193" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.11 AWS ECS creation finished" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.11-AWS-ECS-creation-finished.png?fit=300%2C172&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.11-AWS-ECS-creation-finished.png?fit=336%2C193&amp;ssl=1" class="alignnone wp-image-45018" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.11-AWS-ECS-creation-finished.png?resize=223%2C128&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.11-AWS-ECS-creation-finished.png?w=336&amp;ssl=1 336w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.11-AWS-ECS-creation-finished.png?resize=300%2C172&amp;ssl=1 300w" sizes="(max-width: 223px) 100vw, 223px" data-recalc-dims="1" /></p> <p>Click it! It will bring you to the Cluster overview page. Now, zoom in on the weblogic-cluster and go to the Tasks tab and then select the &#8216;Stopped&#8217; tasks. The resulting page should look like shown below:</p> <p><img data-attachment-id="45019" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-12-aws-ecs-cluster-status/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.12-AWS-ECS-cluster-status.png?fit=1901%2C789&amp;ssl=1" data-orig-size="1901,789" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.12 AWS ECS cluster status" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.12-AWS-ECS-cluster-status.png?fit=300%2C125&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.12-AWS-ECS-cluster-status.png?fit=702%2C291&amp;ssl=1" class="alignnone wp-image-45019" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.12-AWS-ECS-cluster-status.png?resize=702%2C292&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.12-AWS-ECS-cluster-status.png?resize=1024%2C425&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.12-AWS-ECS-cluster-status.png?resize=300%2C125&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.12-AWS-ECS-cluster-status.png?resize=768%2C319&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.12-AWS-ECS-cluster-status.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>The page shows that something is going wrong in our Cluster: why are there so many Tasks? Why are they STOPPED? So, let’s drill in on one of the many stopped tasks by clicking a Task link:</p> <p><img data-attachment-id="45020" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-13-aws-ecs-cluster-task-cause/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.13-AWS-ECS-cluster-task-cause.png?fit=1711%2C791&amp;ssl=1" data-orig-size="1711,791" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.13 AWS ECS cluster task cause" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.13-AWS-ECS-cluster-task-cause.png?fit=300%2C139&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.13-AWS-ECS-cluster-task-cause.png?fit=702%2C324&amp;ssl=1" class="alignnone wp-image-45020" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.13-AWS-ECS-cluster-task-cause.png?resize=702%2C324&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.13-AWS-ECS-cluster-task-cause.png?resize=1024%2C473&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.13-AWS-ECS-cluster-task-cause.png?resize=300%2C139&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.13-AWS-ECS-cluster-task-cause.png?resize=768%2C355&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.13-AWS-ECS-cluster-task-cause.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>This reveals what&#8217;s going on. The message ‘STOPPED (CannotPullContainerError: Error: image lgorissen/m)’ means that the WebLogic image can’t be accessed. Which makes sense, because in the whole configuration wizard, we have not entered the credentials for accessing the private Docker Hub registry!</p> <p>We need to configure the EC2 instance so it can access the Docker Hub registry.</p> <p>First, look up the ip address of the EC2 instance. Go to the Amazon console and select the ‘instances’ section:</p> <p><img data-attachment-id="45021" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-14-aws-ecs-cluster-ip-address/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.14-AWS-ECS-cluster-ip-address.png?fit=1861%2C275&amp;ssl=1" data-orig-size="1861,275" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.14 AWS ECS cluster ip address" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.14-AWS-ECS-cluster-ip-address.png?fit=300%2C44&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.14-AWS-ECS-cluster-ip-address.png?fit=702%2C104&amp;ssl=1" class="alignnone wp-image-45021" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.14-AWS-ECS-cluster-ip-address.png?resize=702%2C103&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.14-AWS-ECS-cluster-ip-address.png?resize=1024%2C151&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.14-AWS-ECS-cluster-ip-address.png?resize=300%2C44&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.14-AWS-ECS-cluster-ip-address.png?resize=768%2C113&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.14-AWS-ECS-cluster-ip-address.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Note the ip address.</p> <p>Fire up MobaXterm, click &#8216;Start a new remote session&#8217; and select session type &#8216;SSH&#8217; and use the public IP number and the earlier downloaded SSH key:</p> <p><img data-attachment-id="45022" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-15-aws-mobaxterm/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.15-AWS-MobaXterm.png?fit=1195%2C799&amp;ssl=1" data-orig-size="1195,799" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.15 AWS MobaXterm" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.15-AWS-MobaXterm.png?fit=300%2C201&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.15-AWS-MobaXterm.png?fit=702%2C470&amp;ssl=1" class="alignnone size-large wp-image-45022" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.15-AWS-MobaXterm.png?resize=702%2C470&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.15-AWS-MobaXterm.png?resize=1024%2C685&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.15-AWS-MobaXterm.png?resize=300%2C201&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.15-AWS-MobaXterm.png?resize=768%2C513&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.15-AWS-MobaXterm.png?w=1195&amp;ssl=1 1195w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Click OK to start the session, and <strong>login as  ec2-user</strong> : it should look like shown below:</p> <p><img data-attachment-id="45023" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-16-aws-mobaxterm-session/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.16-AWS-MobaXterm-session.png?fit=1150%2C690&amp;ssl=1" data-orig-size="1150,690" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.16 AWS MobaXterm session" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.16-AWS-MobaXterm-session.png?fit=300%2C180&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.16-AWS-MobaXterm-session.png?fit=702%2C421&amp;ssl=1" class="alignnone size-large wp-image-45023" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.16-AWS-MobaXterm-session.png?resize=702%2C421&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.16-AWS-MobaXterm-session.png?resize=1024%2C614&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.16-AWS-MobaXterm-session.png?resize=300%2C180&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.16-AWS-MobaXterm-session.png?resize=768%2C461&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.16-AWS-MobaXterm-session.png?w=1150&amp;ssl=1 1150w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>In that terminal, we will edit the Amazon ECS container agent configuration file:</p> <pre class="brush: bash; title: ; notranslate"> [ec2-user@ip-10-0-1-142 ~]$ sudo vi /etc/ecs/ecs.config </pre> <p>And add the two lines below (insert your appropriate username, password and e-mail!):</p> <pre class="brush: bash; title: ; notranslate"> ECS_ENGINE_AUTH_TYPE=docker ECS_ENGINE_AUTH_DATA={&quot;https://index.docker.io/v1/&quot;:{&quot;username&quot;:&quot;lgorissen&quot;,&quot;password&quot;:&quot;&lt;your_password&gt;&quot;,&quot;email&quot;:&quot;l.gorissen@icloud.com&quot;}} </pre> <p>Next, (1) ensure that the agent uses the ECS_DATADIR variable, (2) re-start the ecs agent and (3) verify that the agent is running:</p> <pre class="brush: bash; title: ; notranslate"> [ec2-user@ip-10-0-1-142 ~]$ docker inspect ecs-agent | grep ECS_DATADIR &quot;ECS_DATADIR=/data&quot;, [ec2-user@ip-10-0-1-142 ~]$ sudo stop ecs ecs stop/waiting [ec2-user@ip-10-0-1-142 ~]$ sudo start ecs ecs start/running, process 3266 [ec2-user@ip-10-0-1-142 ~]$ curl http://localhost:51678/v1/metadata {&quot;Cluster&quot;:&quot;weblogic-cluster&quot;,&quot;ContainerInstanceArn&quot;:&quot;arn:aws:ecs:us-west-2:009784947762:container-instance/ff16c35d-9339-4522-a28e-a11e2e7a3268&quot;,&quot;Version&quot;:&quot;Amazon ECS Agent - v1.14.1 (467c3d7)&quot;} [ec2-user@ip-10-0-1-142 ~]$ </pre> <p>Back to the weblogic-cluster overview page, the cluster should now have a Task with status RUNNING:</p> <p><img data-attachment-id="45024" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-17-aws-ecs-cluster-task-running/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-cluster-task-running.png?fit=1638%2C531&amp;ssl=1" data-orig-size="1638,531" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.17 AWS ECS cluster task running" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-cluster-task-running.png?fit=300%2C97&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-cluster-task-running.png?fit=702%2C228&amp;ssl=1" class="alignnone wp-image-45024" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-cluster-task-running.png?resize=702%2C228&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-cluster-task-running.png?resize=1024%2C332&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-cluster-task-running.png?resize=300%2C97&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-cluster-task-running.png?resize=768%2C249&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-cluster-task-running.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Then point browser to the public IP address you also used in the MobaXterm SSH session: http://35.160.191.190:7001/console</p> <p><img data-attachment-id="45025" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-17-aws-ecs-weblogic-1/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-WebLogic-1.png?fit=946%2C169&amp;ssl=1" data-orig-size="946,169" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.17 AWS ECS WebLogic 1" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-WebLogic-1.png?fit=300%2C54&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-WebLogic-1.png?fit=702%2C125&amp;ssl=1" class="alignnone wp-image-45025" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-WebLogic-1.png?resize=621%2C111&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-WebLogic-1.png?w=946&amp;ssl=1 946w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-WebLogic-1.png?resize=300%2C54&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.17-AWS-ECS-WebLogic-1.png?resize=768%2C137&amp;ssl=1 768w" sizes="(max-width: 621px) 100vw, 621px" data-recalc-dims="1" /></p> <p>And after logging in, check for the developer_domain:</p> <p><img data-attachment-id="45026" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/5-19-aws-ecs-weblogic-2/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.19-AWS-ECS-WebLogic-2.png?fit=1107%2C549&amp;ssl=1" data-orig-size="1107,549" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="5.19 AWS ECS WebLogic 2" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.19-AWS-ECS-WebLogic-2.png?fit=300%2C149&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.19-AWS-ECS-WebLogic-2.png?fit=702%2C348&amp;ssl=1" class="alignnone size-large wp-image-45026" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.19-AWS-ECS-WebLogic-2.png?resize=702%2C348&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.19-AWS-ECS-WebLogic-2.png?resize=1024%2C508&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.19-AWS-ECS-WebLogic-2.png?resize=300%2C149&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.19-AWS-ECS-WebLogic-2.png?resize=768%2C381&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/5.19-AWS-ECS-WebLogic-2.png?w=1107&amp;ssl=1 1107w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>&nbsp;</p> <p>Indeed, this must be from our Container image from Docker Hub!</p> <p>&nbsp;</p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/">Docker, WebLogic Image on Amazon EC2 Container Service</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Luc Gorissen https://technology.amis.nl/?p=44941 Wed May 24 2017 10:39:46 GMT-0400 (EDT) Docker, WebLogic Image on Microsoft Azure Container Service https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/ <p><strong>This blog series shows how to get started with WebLogic and Docker &#8211; in 3 different Clouds:</strong></p> <ul> <li><a href="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/">Docker and the Oracle Images</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/">Create and run a WebLogic Docker Image on a local machine and upload the WebLogic Docker Image into the Docker Hub registry</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/">WebLogic Docker Container on Oracle Container Cloud Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/">WebLogic Docker Container on Microsoft Azure Container Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/">WebLogic Docker Container on Amazon EC2 Container Service</a></li> </ul> <p>This blog is running a WebLogic Docker Container image from the Docker Hub registry on the Microsoft Azure Container Service.</p> <h2>Starting point &amp; Outline</h2> <p>Starting point for this blog is:</p> <ul> <li>A computer running Ubuntu and with Docker installed</li> <li>A WebLogic Docker Container Image in a private Docker Hub repository, as described in <a href="https://technology.amis.nl/?p=44935&amp;preview=true">this blog</a></li> <li>Access to Microsoft Azure, e.g. via a trial subscription</li> </ul> <p>The blog itself consists of 2 main parts:</p> <ol> <li>Create an Azure Container Service</li> <li>Run the container image from the Docker Hub repository on the created Cloud Service</li> </ol> <hr /> <p>&nbsp;</p> <h2>Create an Azure Container Service</h2> <p>The Azure Container Service offers the choice between using Docker Swarm, DC/OS, or Kubernetes for orchestration/management of the Docker container solution. For our specific use case, I picked Docker Swarm.</p> <p>The high level steps for creating your Azure Container Service are:</p> <ul> <li>create an SSH RSA public key</li> <li>deploy an Azure Container Service cluster (via the Azure portal), by using an Azure Resource Manager template (for Docker Swarm)</li> </ul> <p>Let’s get started.</p> <ul> <li><strong>create an SSH RSA public key</strong></li> </ul> <p>Log in into the Ubuntu machine and generate the key:</p> <pre class="brush: bash; title: ; notranslate"> developer@developer-VirtualBox:~$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/developer/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/developer/.ssh/id_rsa. Your public key has been saved in /home/developer/.ssh/id_rsa.pub. The key fingerprint is: SHA256:Lpm8BrZoQscz1E6Maq9J0WdjjLjHAP5fxZXBdlrdzMY developer@developer-VirtualBox The key's randomart image is: +---[RSA 2048]----+ |          ..  .+.| |           ooo .E| |.   +     .o+  . | |o ooo+  . ..     | | =+oo*  So       | | +*=*o.+.        | |ooo*oo=..        | |o =.o oo         | | =.  o.          | +----[SHA256]-----+ developer@developer-VirtualBox:~$ </pre> <ul> <li><strong>deploy an Azure Container Service cluster (via the Azure portal), by using an Azure Resource Manager template (for Docker Swarm)</strong></li> </ul> <p>First, login into the Microsoft Azure Portal on <a href="http://portal.azure.com">http://portal.azure.com</a>. Here, click the + sign, select ‘Containers’ and then ‘Azure Container Service’:</p> <p><img data-attachment-id="44991" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-1-azure-add-container-service/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.1-Azure-Add-Container-Service.png?fit=1103%2C871&amp;ssl=1" data-orig-size="1103,871" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.1 Azure Add Container Service" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.1-Azure-Add-Container-Service.png?fit=300%2C237&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.1-Azure-Add-Container-Service.png?fit=702%2C555&amp;ssl=1" class="alignnone wp-image-44991" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.1-Azure-Add-Container-Service.png?resize=487%2C385&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.1-Azure-Add-Container-Service.png?resize=1024%2C809&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.1-Azure-Add-Container-Service.png?resize=300%2C237&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.1-Azure-Add-Container-Service.png?resize=768%2C606&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.1-Azure-Add-Container-Service.png?w=1103&amp;ssl=1 1103w" sizes="(max-width: 487px) 100vw, 487px" data-recalc-dims="1" /></p> <p>The next screen appears:</p> <p><img data-attachment-id="44993" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-2-azure-create-container-service/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.2-Azure-Create-Container-Service.png?fit=828%2C852&amp;ssl=1" data-orig-size="828,852" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.2 Azure Create Container Service" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.2-Azure-Create-Container-Service.png?fit=292%2C300&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.2-Azure-Create-Container-Service.png?fit=702%2C722&amp;ssl=1" class="alignnone wp-image-44993" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.2-Azure-Create-Container-Service.png?resize=488%2C502&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.2-Azure-Create-Container-Service.png?w=828&amp;ssl=1 828w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.2-Azure-Create-Container-Service.png?resize=292%2C300&amp;ssl=1 292w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.2-Azure-Create-Container-Service.png?resize=768%2C790&amp;ssl=1 768w" sizes="(max-width: 488px) 100vw, 488px" data-recalc-dims="1" /></p> <p>Click the Create button.</p> <p><img data-attachment-id="44994" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-3-azure-create-container-service-configuration/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.3-Azure-Create-Container-Service-configuration.png?fit=903%2C882&amp;ssl=1" data-orig-size="903,882" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.3 Azure Create Container Service configuration" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.3-Azure-Create-Container-Service-configuration.png?fit=300%2C293&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.3-Azure-Create-Container-Service-configuration.png?fit=702%2C686&amp;ssl=1" class="alignnone wp-image-44994" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.3-Azure-Create-Container-Service-configuration.png?resize=526%2C513&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.3-Azure-Create-Container-Service-configuration.png?w=903&amp;ssl=1 903w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.3-Azure-Create-Container-Service-configuration.png?resize=300%2C293&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.3-Azure-Create-Container-Service-configuration.png?resize=768%2C750&amp;ssl=1 768w" sizes="(max-width: 526px) 100vw, 526px" data-recalc-dims="1" /></p> <p>Complete the settings like shown in the figure above and click OK to move to the next page:</p> <p><img data-attachment-id="44995" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-4-azure-create-container-service-master-configuration/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?fit=904%2C897&amp;ssl=1" data-orig-size="904,897" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.4 Azure Create Container Service master configuration" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?fit=300%2C298&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?fit=702%2C697&amp;ssl=1" class="alignnone wp-image-44995" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?resize=531%2C527&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?w=904&amp;ssl=1 904w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?resize=150%2C150&amp;ssl=1 150w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?resize=300%2C298&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?resize=768%2C762&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.4-Azure-Create-Container-Service-master-configuration.png?resize=144%2C144&amp;ssl=1 144w" sizes="(max-width: 531px) 100vw, 531px" data-recalc-dims="1" /></p> <p>For the Master configuration, complete the settings as shown above. Use the SSH key that was created in step (1). Note that the ‘Master’ is the Manager node in a Docker Swarm. One Master node is enough for this simple configuration. Next, click OK.</p> <p><img data-attachment-id="44996" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-5-azure-create-container-service-agent-configuration/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.5-Azure-Create-Container-Service-agent-configuration.png?fit=890%2C874&amp;ssl=1" data-orig-size="890,874" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.5 Azure Create Container Service agent configuration" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.5-Azure-Create-Container-Service-agent-configuration.png?fit=300%2C295&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.5-Azure-Create-Container-Service-agent-configuration.png?fit=702%2C689&amp;ssl=1" class="alignnone wp-image-44996" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.5-Azure-Create-Container-Service-agent-configuration.png?resize=539%2C529&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.5-Azure-Create-Container-Service-agent-configuration.png?w=890&amp;ssl=1 890w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.5-Azure-Create-Container-Service-agent-configuration.png?resize=300%2C295&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.5-Azure-Create-Container-Service-agent-configuration.png?resize=768%2C754&amp;ssl=1 768w" sizes="(max-width: 539px) 100vw, 539px" data-recalc-dims="1" /></p> <p>That brings us to the Agent configuration page, where Agent is actually a Docker Swarm Worker node. We need only 1 agent. For the Virtual Machine size, the DS2 profile is chosen, which has 2 cpu cores and 7GB of RAM. That should be enough to run the WebLogic container on.</p> <p>Click OK to continue:</p> <p><img data-attachment-id="44997" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-6-azure-create-container-service-configuration-summary/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.6-Azure-Create-Container-Service-configuration-summary.png?fit=1257%2C886&amp;ssl=1" data-orig-size="1257,886" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.6 Azure Create Container Service configuration summary" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.6-Azure-Create-Container-Service-configuration-summary.png?fit=300%2C211&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.6-Azure-Create-Container-Service-configuration-summary.png?fit=702%2C495&amp;ssl=1" class="alignnone wp-image-44997" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.6-Azure-Create-Container-Service-configuration-summary.png?resize=546%2C385&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.6-Azure-Create-Container-Service-configuration-summary.png?resize=1024%2C722&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.6-Azure-Create-Container-Service-configuration-summary.png?resize=300%2C211&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.6-Azure-Create-Container-Service-configuration-summary.png?resize=768%2C541&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.6-Azure-Create-Container-Service-configuration-summary.png?w=1257&amp;ssl=1 1257w" sizes="(max-width: 546px) 100vw, 546px" data-recalc-dims="1" /></p> <p>Review the Summary page, and the click OK to start creation of your Azure Container Service:</p> <p><img data-attachment-id="44998" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-7-azure-create-container-service-creation/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.7-Azure-Create-Container-Service-creation.png?fit=1856%2C834&amp;ssl=1" data-orig-size="1856,834" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.7 Azure Create Container Service creation" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.7-Azure-Create-Container-Service-creation.png?fit=300%2C135&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.7-Azure-Create-Container-Service-creation.png?fit=702%2C315&amp;ssl=1" class="alignnone wp-image-44998" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.7-Azure-Create-Container-Service-creation.png?resize=702%2C315&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.7-Azure-Create-Container-Service-creation.png?resize=1024%2C460&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.7-Azure-Create-Container-Service-creation.png?resize=300%2C135&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.7-Azure-Create-Container-Service-creation.png?resize=768%2C345&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.7-Azure-Create-Container-Service-creation.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>After some time, your Azure Container Service will be created!</p> <hr /> <p>&nbsp;</p> <h2>Run the WebLogic image from Docker Hub registry</h2> <p>Now, we will start to get the WebLogic image from the Docker Hub registry running on the Azure Container Service. This is achieved from the command line of our local Ubuntu machine – the one that also has Docker installed.</p> <p>The following steps will be done:</p> <ul> <li>Make a tunnel to the Master node</li> <li>Run the WebLogic container</li> <li>Add a LoadBalancer rule for forwarding port 7001</li> <li>Test</li> </ul> <p>Let’s get started.</p> <ul> <li><strong>Make a SSH tunnel to the Master node</strong></li> </ul> <p>From the local Ubuntu machine, make an SSH tunnel to the Master node. In that way, docker commands from the Ubuntu machine will be handled by the Docker Swarm container on the Master node. First, establish the tunnel, set the Docker host that will be used by the local Ubuntu machine and then list the images. The output of the ‘docker images list’ command shows what Docker images are available on the Master node – in our case: none (as this is a fresh installation):</p> <pre class="brush: bash; title: ; notranslate"> developer@developer-VirtualBox:~$ ssh -fNL 2375:localhost:2375 -p 2200 lgorisse@lgomgmt.northeurope.cloudapp.azure.com developer@developer-VirtualBox:~$ export DOCKER_HOST=:2375 developer@developer-VirtualBox:~$ docker images list REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE developer@developer-VirtualBox:~$ </pre> <ul> <li><strong>Run the WebLogic container</strong></li> </ul> <p>Now, give the commands below on the local Ubuntu machine to start the WebLogic container on the Azure Container Service. The WebLogic container will run on the agent machine.</p> <p>The following steps have to be done:</p> <ul> <li>Login into the Docker Hub, using your Docker Hub account. This is necessary because the Docker Hub registry that I used is a private registry (= password protected)</li> <li>Pull the WebLogic Container image with the docker pull command</li> <li>Run the image with the port mapping for port 7001</li> <li>Notice in the output below that I also had a yeasy/simple-web container running</li> </ul> <pre class="brush: bash; title: ; notranslate"> developer@developer-VirtualBox:~$ docker login Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one. Username: lgorissen Password: Login Succeeded developer@developer-VirtualBox:~$ docker pull lgorissen/myfirstweblogic Using default tag: latest swarm-agent-595FAAF3000001: Pulling lgorissen/myfirstweblogic:latest... : downloaded developer@developer-VirtualBox:~$ docker run -d -p 7001:7001 lgorissen/myfirstweblogic 6506b88dc7cc166df55c470e4e7f9732cfb55353c8a1a84d8048c7689c886a7c developer@developer-VirtualBox:~$ docker container ps CONTAINER ID        IMAGE                       COMMAND                  CREATED                  STATUS              PORTS                                                   NAMES 6506b88dc7cc        lgorissen/myfirstweblogic   &quot;startWebLogic.sh&quot;       Less than a second ago   Up 21 seconds       5556/tcp, 7002/tcp, 8453/tcp, 10.0.0.5:7001-&gt;7001/tcp   swarm-agent-595FAAF3000001/competent_allen fd4c32b1fd19        yeasy/simple-web            &quot;/bin/sh -c 'pytho...&quot;   8 minutes ago            Up 8 minutes        10.0.0.5:80-&gt;80/tcp                                     swarm-agent-595FAAF3000001/pensive_pike developer@developer-VirtualBox:~$ </pre> <ul> <li><strong>Add a LoadBalancer rule for forwarding port 7001</strong></li> </ul> <p>In this set-up, the Agent machine can’t be reached over port 7001. A route in the LoadBalancer that routes traffic for this port has to be created. Creating that LoadBalancer route can be done in the Azure Portal. First, look up the resource groups in the portal:</p> <p><img data-attachment-id="44999" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-8-azure-lb_rule-resource-group/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.8-Azure-LB_Rule-resource-group.png?fit=480%2C460&amp;ssl=1" data-orig-size="480,460" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.8 Azure LB_Rule resource group" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.8-Azure-LB_Rule-resource-group.png?fit=300%2C288&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.8-Azure-LB_Rule-resource-group.png?fit=480%2C460&amp;ssl=1" class="alignnone wp-image-44999" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.8-Azure-LB_Rule-resource-group.png?resize=333%2C319&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.8-Azure-LB_Rule-resource-group.png?w=480&amp;ssl=1 480w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.8-Azure-LB_Rule-resource-group.png?resize=300%2C288&amp;ssl=1 300w" sizes="(max-width: 333px) 100vw, 333px" data-recalc-dims="1" /></p> <p>Open the weblogic-demo resource group by clicking on it:</p> <p><img data-attachment-id="45000" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-9-azure-lb_rule-resource-group-opened/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.9-Azure-LB_Rule-resource-group-opened.png?fit=1867%2C876&amp;ssl=1" data-orig-size="1867,876" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.9 Azure LB_Rule resource group opened" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.9-Azure-LB_Rule-resource-group-opened.png?fit=300%2C141&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.9-Azure-LB_Rule-resource-group-opened.png?fit=702%2C329&amp;ssl=1" class="alignnone wp-image-45000" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.9-Azure-LB_Rule-resource-group-opened.png?resize=702%2C329&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.9-Azure-LB_Rule-resource-group-opened.png?resize=1024%2C480&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.9-Azure-LB_Rule-resource-group-opened.png?resize=300%2C141&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.9-Azure-LB_Rule-resource-group-opened.png?resize=768%2C360&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.9-Azure-LB_Rule-resource-group-opened.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Click on the Load balancer for the agent (remember, out WebLogic container is running on the agent virtual machine). That brings up the Load balancer screen:</p> <p><img data-attachment-id="45001" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-10-azure-lb_rule-rules-agent/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?fit=1916%2C917&amp;ssl=1" data-orig-size="1916,917" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.10 Azure LB_Rule Rules agent" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?fit=300%2C144&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?fit=702%2C336&amp;ssl=1" class="alignnone wp-image-45001" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?resize=702%2C336&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?resize=1024%2C490&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?resize=300%2C144&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?resize=768%2C368&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?resize=1078%2C516&amp;ssl=1 1078w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?resize=702%2C336&amp;ssl=1 702w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.10-Azure-LB_Rule-Rules-agent.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Click on the Add sign to add a new load balancer rule for port 7001:</p> <p><img data-attachment-id="45002" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-11-azure-lb_rule-rules-7001/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.11-Azure-LB_Rule-Rules-7001.png?fit=806%2C876&amp;ssl=1" data-orig-size="806,876" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.11 Azure LB_Rule Rules 7001" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.11-Azure-LB_Rule-Rules-7001.png?fit=276%2C300&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.11-Azure-LB_Rule-Rules-7001.png?fit=702%2C763&amp;ssl=1" class="alignnone wp-image-45002" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.11-Azure-LB_Rule-Rules-7001.png?resize=579%2C629&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.11-Azure-LB_Rule-Rules-7001.png?w=806&amp;ssl=1 806w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.11-Azure-LB_Rule-Rules-7001.png?resize=276%2C300&amp;ssl=1 276w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.11-Azure-LB_Rule-Rules-7001.png?resize=768%2C835&amp;ssl=1 768w" sizes="(max-width: 579px) 100vw, 579px" data-recalc-dims="1" /></p> <p>Enter front-end, back-end and port numbers to establish the new route and save it.</p> <p>&nbsp;</p> <ul> <li><strong>Test</strong></li> </ul> <p>Again look into the resource groups in the Azure Portal to find the public dns name for the agents:</p> <p><img data-attachment-id="45003" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/4-12-azure-agent-dns-name/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?fit=1536%2C420&amp;ssl=1" data-orig-size="1536,420" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="4.12 Azure Agent dns name" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?fit=300%2C82&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?fit=702%2C192&amp;ssl=1" class="alignnone size-large wp-image-45003" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?resize=702%2C192&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?resize=1024%2C280&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?resize=300%2C82&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?resize=768%2C210&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?w=1536&amp;ssl=1 1536w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/4.12-Azure-Agent-dns-name.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>From the figure above, we see that the url to use for accessing the WebLogic container is: <a href="http://lgoagents.northeurope.cloudapp.azure.com:7001/">http://lgoagents.northeurope.cloudapp.azure.com:7001/</a></p> <p>Nifty :-S</p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/">Docker, WebLogic Image on Microsoft Azure Container Service</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Luc Gorissen https://technology.amis.nl/?p=44939 Wed May 24 2017 10:37:37 GMT-0400 (EDT) Docker, WebLogic Image on Oracle Container Cloud Service https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/ <p><strong>This blog series shows how to get started with WebLogic and Docker &#8211; in 3 different Clouds:</strong></p> <ul> <li><a href="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/">Docker and the Oracle Images</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/">Create and run a WebLogic Docker Image on a local machine and upload the WebLogic Docker Image into the Docker Hub registry</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/">WebLogic Docker Container on Oracle Container Cloud Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/">WebLogic Docker Container on Microsoft Azure Container Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/">WebLogic Docker Container on Amazon EC2 Container Service</a></li> </ul> <h2>Starting point &amp; Outline</h2> <p>Starting point for this blog is:</p> <ul> <li>A computer with a browser</li> <li>A WebLogic Docker Container Image in a private Docker Hub repository, as described in this blog [todo: make reference]</li> <li>Identity Domain Administrator access to the Oracle Public Cloud, e.g. via a trial account</li> </ul> <p>The blog itself consists of 2 main parts:</p> <ol> <li>Create a Container Cloud Service</li> <li>Run the container image from the Docker Hub repository on the created Cloud Service</li> </ol> <hr /> <h2>Create a Container Cloud Service</h2> <p>First step is to create an Oracle Container Cloud Service. Start by logging in as Identity Domain Administrator. When you have a trial account, you will have received a mail like the one below:</p> <p><img data-attachment-id="44966" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-1-oracle-myservices-mail/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.1-Oracle-MyServices-mail.png?fit=949%2C458&amp;ssl=1" data-orig-size="949,458" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.1 Oracle MyServices mail" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.1-Oracle-MyServices-mail.png?fit=300%2C145&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.1-Oracle-MyServices-mail.png?fit=702%2C339&amp;ssl=1" class="alignnone wp-image-44966" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.1-Oracle-MyServices-mail.png?resize=516%2C249&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.1-Oracle-MyServices-mail.png?w=949&amp;ssl=1 949w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.1-Oracle-MyServices-mail.png?resize=300%2C145&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.1-Oracle-MyServices-mail.png?resize=768%2C371&amp;ssl=1 768w" sizes="(max-width: 516px) 100vw, 516px" data-recalc-dims="1" /></p> <p>Login into MyServices Administration using the url from the mail as shown above:</p> <p><img data-attachment-id="44967" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-2-oracle-myservices-page/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.2-Oracle-MyServices-page.png?fit=1913%2C738&amp;ssl=1" data-orig-size="1913,738" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.2 Oracle MyServices page" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.2-Oracle-MyServices-page.png?fit=300%2C116&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.2-Oracle-MyServices-page.png?fit=702%2C271&amp;ssl=1" class="alignnone wp-image-44967" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.2-Oracle-MyServices-page.png?resize=557%2C215&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.2-Oracle-MyServices-page.png?resize=1024%2C395&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.2-Oracle-MyServices-page.png?resize=300%2C116&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.2-Oracle-MyServices-page.png?resize=768%2C296&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.2-Oracle-MyServices-page.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 557px) 100vw, 557px" data-recalc-dims="1" /></p> <p>Click on the ‘Create Instance’ to start provisioning fo the Container Cloud Service. A pop-up is now shown:</p> <p><img data-attachment-id="44968" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-3-oracle-myservices-popup/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.3-Oracle-MyServices-popup.png?fit=938%2C584&amp;ssl=1" data-orig-size="938,584" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.3 Oracle MyServices popup" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.3-Oracle-MyServices-popup.png?fit=300%2C187&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.3-Oracle-MyServices-popup.png?fit=702%2C437&amp;ssl=1" class="alignnone wp-image-44968" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.3-Oracle-MyServices-popup.png?resize=480%2C299&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.3-Oracle-MyServices-popup.png?w=938&amp;ssl=1 938w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.3-Oracle-MyServices-popup.png?resize=300%2C187&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.3-Oracle-MyServices-popup.png?resize=768%2C478&amp;ssl=1 768w" sizes="(max-width: 480px) 100vw, 480px" data-recalc-dims="1" /></p> <p>Pick the Container (cloud service), which brings you to the first page of the wizard for creation of the Container Cloud Service:</p> <p><img data-attachment-id="44969" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-4-oracle-myservices-service-wizard-1/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.4-Oracle-MyServices-service-wizard-1.png?fit=1614%2C679&amp;ssl=1" data-orig-size="1614,679" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.4 Oracle MyServices service wizard 1" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.4-Oracle-MyServices-service-wizard-1.png?fit=300%2C126&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.4-Oracle-MyServices-service-wizard-1.png?fit=702%2C295&amp;ssl=1" class="alignnone wp-image-44969" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.4-Oracle-MyServices-service-wizard-1.png?resize=547%2C230&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.4-Oracle-MyServices-service-wizard-1.png?resize=1024%2C431&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.4-Oracle-MyServices-service-wizard-1.png?resize=300%2C126&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.4-Oracle-MyServices-service-wizard-1.png?resize=768%2C323&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.4-Oracle-MyServices-service-wizard-1.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 547px) 100vw, 547px" data-recalc-dims="1" /></p> <p>Click &#8216;Create Service&#8217; button:</p> <p><img data-attachment-id="44970" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-5-oracle-myservices-service-wizard-2/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.5-Oracle-MyServices-service-wizard-2.png?fit=1601%2C781&amp;ssl=1" data-orig-size="1601,781" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.5 Oracle MyServices service wizard 2" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.5-Oracle-MyServices-service-wizard-2.png?fit=300%2C146&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.5-Oracle-MyServices-service-wizard-2.png?fit=702%2C343&amp;ssl=1" class="alignnone size-large wp-image-44970" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.5-Oracle-MyServices-service-wizard-2.png?resize=702%2C343&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.5-Oracle-MyServices-service-wizard-2.png?resize=1024%2C500&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.5-Oracle-MyServices-service-wizard-2.png?resize=300%2C146&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.5-Oracle-MyServices-service-wizard-2.png?resize=768%2C375&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.5-Oracle-MyServices-service-wizard-2.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>On this page, create the SSH Public Key: click the Edit button and select &#8216;Create a New Key&#8217;:</p> <p><img data-attachment-id="44971" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-6-oracle-myservices-service-wizard-2-key-gen/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.6-Oracle-MyServices-service-wizard-2-key-gen.png?fit=651%2C490&amp;ssl=1" data-orig-size="651,490" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.6 Oracle MyServices service wizard 2 key gen" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.6-Oracle-MyServices-service-wizard-2-key-gen.png?fit=300%2C226&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.6-Oracle-MyServices-service-wizard-2-key-gen.png?fit=651%2C490&amp;ssl=1" class="alignnone wp-image-44971" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.6-Oracle-MyServices-service-wizard-2-key-gen.png?resize=419%2C315&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.6-Oracle-MyServices-service-wizard-2-key-gen.png?w=651&amp;ssl=1 651w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.6-Oracle-MyServices-service-wizard-2-key-gen.png?resize=300%2C226&amp;ssl=1 300w" sizes="(max-width: 419px) 100vw, 419px" data-recalc-dims="1" /></p> <p>Click Enter:</p> <p><img data-attachment-id="44972" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-7-oracle-myservices-service-wizard-2-key-gen-download/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.7-Oracle-MyServices-service-wizard-2-key-gen-download.png?fit=529%2C163&amp;ssl=1" data-orig-size="529,163" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.7 Oracle MyServices service wizard 2 key gen download" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.7-Oracle-MyServices-service-wizard-2-key-gen-download.png?fit=300%2C92&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.7-Oracle-MyServices-service-wizard-2-key-gen-download.png?fit=529%2C163&amp;ssl=1" class="alignnone wp-image-44972" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.7-Oracle-MyServices-service-wizard-2-key-gen-download.png?resize=289%2C89&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.7-Oracle-MyServices-service-wizard-2-key-gen-download.png?w=529&amp;ssl=1 529w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.7-Oracle-MyServices-service-wizard-2-key-gen-download.png?resize=300%2C92&amp;ssl=1 300w" sizes="(max-width: 289px) 100vw, 289px" data-recalc-dims="1" /></p> <p>Download the key. Continue by clicking Next. That brings you to the overview page:</p> <p><img data-attachment-id="44973" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-8-oracle-myservices-service-wizard-3-overview/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.8-Oracle-MyServices-service-wizard-3-overview.png?fit=1615%2C678&amp;ssl=1" data-orig-size="1615,678" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.8 Oracle MyServices service wizard 3 overview" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.8-Oracle-MyServices-service-wizard-3-overview.png?fit=300%2C126&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.8-Oracle-MyServices-service-wizard-3-overview.png?fit=702%2C295&amp;ssl=1" class="alignnone wp-image-44973" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.8-Oracle-MyServices-service-wizard-3-overview.png?resize=540%2C227&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.8-Oracle-MyServices-service-wizard-3-overview.png?resize=1024%2C430&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.8-Oracle-MyServices-service-wizard-3-overview.png?resize=300%2C126&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.8-Oracle-MyServices-service-wizard-3-overview.png?resize=768%2C322&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.8-Oracle-MyServices-service-wizard-3-overview.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 540px) 100vw, 540px" data-recalc-dims="1" /></p> <p>Review the data and then click ‘Create’ to start creation of the Container Cloud Service:</p> <p><img data-attachment-id="44974" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-9-oracle-service-creation/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.9-Oracle-service-creation.png?fit=1624%2C794&amp;ssl=1" data-orig-size="1624,794" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.9 Oracle service creation" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.9-Oracle-service-creation.png?fit=300%2C147&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.9-Oracle-service-creation.png?fit=702%2C343&amp;ssl=1" class="alignnone wp-image-44974" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.9-Oracle-service-creation.png?resize=538%2C263&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.9-Oracle-service-creation.png?resize=1024%2C501&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.9-Oracle-service-creation.png?resize=300%2C147&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.9-Oracle-service-creation.png?resize=768%2C375&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.9-Oracle-service-creation.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 538px) 100vw, 538px" data-recalc-dims="1" /></p> <p>Now, the service is creating for several minutes &#8211; mine took 11 minutes. The page will then look like:</p> <p><img data-attachment-id="44975" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-10-oracle-service-created/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.10-Oracle-service-created.png?fit=1278%2C145&amp;ssl=1" data-orig-size="1278,145" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.10 Oracle service created" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.10-Oracle-service-created.png?fit=300%2C34&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.10-Oracle-service-created.png?fit=702%2C80&amp;ssl=1" class="alignnone wp-image-44975" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.10-Oracle-service-created.png?resize=524%2C59&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.10-Oracle-service-created.png?resize=1024%2C116&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.10-Oracle-service-created.png?resize=300%2C34&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.10-Oracle-service-created.png?resize=768%2C87&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.10-Oracle-service-created.png?w=1278&amp;ssl=1 1278w" sizes="(max-width: 524px) 100vw, 524px" data-recalc-dims="1" /></p> <p>Click on the ‘WebLogicService’, which brings you to a more detailed overview of your created Container Cloud Service:</p> <p><img data-attachment-id="44976" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-11-oracle-service-container-console/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.11-Oracle-service-container-console.png?fit=1606%2C786&amp;ssl=1" data-orig-size="1606,786" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.11 Oracle service container console" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.11-Oracle-service-container-console.png?fit=300%2C147&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.11-Oracle-service-container-console.png?fit=702%2C343&amp;ssl=1" class="alignnone wp-image-44976" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.11-Oracle-service-container-console.png?resize=534%2C261&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.11-Oracle-service-container-console.png?resize=1024%2C501&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.11-Oracle-service-container-console.png?resize=300%2C147&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.11-Oracle-service-container-console.png?resize=768%2C376&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.11-Oracle-service-container-console.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 534px) 100vw, 534px" data-recalc-dims="1" /></p> <p>Like shown in the above picture: go to the ‘Container Console’:</p> <p><img data-attachment-id="44977" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-12-oracle-service-container-console-login/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.12-Oracle-service-container-console-login.png?fit=474%2C437&amp;ssl=1" data-orig-size="474,437" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.12 Oracle service container console login" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.12-Oracle-service-container-console-login.png?fit=300%2C277&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.12-Oracle-service-container-console-login.png?fit=474%2C437&amp;ssl=1" class="alignnone wp-image-44977" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.12-Oracle-service-container-console-login.png?resize=302%2C278&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.12-Oracle-service-container-console-login.png?w=474&amp;ssl=1 474w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.12-Oracle-service-container-console-login.png?resize=300%2C277&amp;ssl=1 300w" sizes="(max-width: 302px) 100vw, 302px" data-recalc-dims="1" /></p> <p>Login with the admin username and password that you entered when creating the Container Cloud Service. This will now bring you to the Dashboard of the Cloud Container Service named WebLogicService:</p> <p><img data-attachment-id="44978" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-13-oracle-service-container-console/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.13-Oracle-service-container-console.png?fit=1901%2C927&amp;ssl=1" data-orig-size="1901,927" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.13 Oracle service container console" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.13-Oracle-service-container-console.png?fit=300%2C146&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.13-Oracle-service-container-console.png?fit=702%2C342&amp;ssl=1" class="alignnone wp-image-44978" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.13-Oracle-service-container-console.png?resize=521%2C254&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.13-Oracle-service-container-console.png?resize=1024%2C499&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.13-Oracle-service-container-console.png?resize=300%2C146&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.13-Oracle-service-container-console.png?resize=768%2C375&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.13-Oracle-service-container-console.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 521px) 100vw, 521px" data-recalc-dims="1" /></p> <p>In this console, the main concepts of the Oracle Container Cloud Service are clearly visible:</p> <ul> <li>Task: action created in the Oracle Container Cloud Service as a response to your requests</li> <li>Event: individual, discrete operations on the Oracle Container Cloud Service</li> <li>Service: comprises the information required for running a Docker image on a host</li> <li>Stack: comprises the configuration for running a set of services as a single entity</li> <li>Deployment: a deployed service or stack on the Oracle Container Cloud Service</li> <li>Container: a Docker container, i.e. a process created to run a Docker image</li> <li>Image: a Docker image</li> <li>Hosts: the Oracle Compute virtual machines that are managed by the Oracle Container Cloud Service (also: worker nodes)</li> <li>Resource Pools: a combination of hosts into groups of compute resources</li> <li>Registry: a Docker registry, i.e. a system for storing and sharing Docker images</li> <li>Tags: labels for organizing resource pools and the hosts within them (used for management)</li> </ul> <p>&nbsp;</p> <hr /> <h2>Run the WebLogic image from Docker Hub registry</h2> <p>With the Oracle Container Cloud Service up and running, we can start running the WebLogic image that we have in Docker Hub. The following has to be done:</p> <ol> <li>Update the registry to access the private Docker Hub repository where the WebLogic image is stored</li> <li>Create a Service for the WebLogic container image</li> <li>Deploy the Service</li> <li>Test the deployment</li> </ol> <p>Steps are shown below:</p> <ul> <li><strong>Update the registry to access the private Docker Hub repository where the WebLogic image is stored</strong></li> </ul> <p>Goto registries:</p> <p><img data-attachment-id="44979" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-14-oracle-registries/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.14-Oracle-registries.png?fit=1725%2C752&amp;ssl=1" data-orig-size="1725,752" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.14 Oracle registries" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.14-Oracle-registries.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.14-Oracle-registries.png?fit=702%2C306&amp;ssl=1" class="alignnone wp-image-44979" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.14-Oracle-registries.png?resize=603%2C263&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.14-Oracle-registries.png?resize=1024%2C446&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.14-Oracle-registries.png?resize=300%2C131&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.14-Oracle-registries.png?resize=768%2C335&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.14-Oracle-registries.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 603px) 100vw, 603px" data-recalc-dims="1" /></p> <p>Click the Edit button and add the authorization details for the private Docker Hub registry:</p> <p><img data-attachment-id="44980" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-15-oracle-registries-edited/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.15-Oracle-registries-edited.png?fit=768%2C572&amp;ssl=1" data-orig-size="768,572" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.15 Oracle registries edited" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.15-Oracle-registries-edited.png?fit=300%2C223&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.15-Oracle-registries-edited.png?fit=702%2C523&amp;ssl=1" class="alignnone wp-image-44980" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.15-Oracle-registries-edited.png?resize=520%2C387&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.15-Oracle-registries-edited.png?w=768&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.15-Oracle-registries-edited.png?resize=300%2C223&amp;ssl=1 300w" sizes="(max-width: 520px) 100vw, 520px" data-recalc-dims="1" /></p> <p>&nbsp;</p> <ul> <li><strong>Create a Service for the WebLogic container image</strong></li> </ul> <p>Next, we’ll create a Service that describes how we want to deploy the WebLogic container image. Goto the Services page and click on the New Service button:</p> <p><img data-attachment-id="44981" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-16-oracle-services/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.16-Oracle-services.png?fit=1682%2C398&amp;ssl=1" data-orig-size="1682,398" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.16 Oracle services" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.16-Oracle-services.png?fit=300%2C71&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.16-Oracle-services.png?fit=702%2C166&amp;ssl=1" class="alignnone wp-image-44981" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.16-Oracle-services.png?resize=626%2C148&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.16-Oracle-services.png?resize=1024%2C242&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.16-Oracle-services.png?resize=300%2C71&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.16-Oracle-services.png?resize=768%2C182&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.16-Oracle-services.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 626px) 100vw, 626px" data-recalc-dims="1" /></p> <p>In the Service Editor pop-up, enter the values like shown below. Note the port mapping settings!</p> <p><img data-attachment-id="44982" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-17-oracle-weblogic-service/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.17-Oracle-WebLogic-service.png?fit=1143%2C966&amp;ssl=1" data-orig-size="1143,966" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.17 Oracle WebLogic service" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.17-Oracle-WebLogic-service.png?fit=300%2C254&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.17-Oracle-WebLogic-service.png?fit=702%2C593&amp;ssl=1" class="alignnone wp-image-44982" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.17-Oracle-WebLogic-service.png?resize=524%2C443&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.17-Oracle-WebLogic-service.png?resize=1024%2C865&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.17-Oracle-WebLogic-service.png?resize=300%2C254&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.17-Oracle-WebLogic-service.png?resize=768%2C649&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.17-Oracle-WebLogic-service.png?w=1143&amp;ssl=1 1143w" sizes="(max-width: 524px) 100vw, 524px" data-recalc-dims="1" /></p> <p>Click Save and note that the Service is added:</p> <p><img data-attachment-id="44983" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-18-oracle-weblogic-service-added/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.18-Oracle-WebLogic-service-added.png?fit=706%2C165&amp;ssl=1" data-orig-size="706,165" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.18 Oracle WebLogic service added" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.18-Oracle-WebLogic-service-added.png?fit=300%2C70&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.18-Oracle-WebLogic-service-added.png?fit=702%2C164&amp;ssl=1" class="alignnone wp-image-44983" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.18-Oracle-WebLogic-service-added.png?resize=483%2C113&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.18-Oracle-WebLogic-service-added.png?w=706&amp;ssl=1 706w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.18-Oracle-WebLogic-service-added.png?resize=300%2C70&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.18-Oracle-WebLogic-service-added.png?resize=702%2C165&amp;ssl=1 702w" sizes="(max-width: 483px) 100vw, 483px" data-recalc-dims="1" /></p> <p>&nbsp;</p> <ul> <li><strong>Deploy the Service</strong></li> </ul> <p>&nbsp;</p> <p>In the previous sceen, click the green Deploy button to start deployment of the service.</p> <p><img data-attachment-id="44984" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-19-oracle-weblogic-service-deployment-settings/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.19-Oracle-WebLogic-service-deployment-settings.png?fit=762%2C668&amp;ssl=1" data-orig-size="762,668" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.19 Oracle WebLogic service deployment settings" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.19-Oracle-WebLogic-service-deployment-settings.png?fit=300%2C263&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.19-Oracle-WebLogic-service-deployment-settings.png?fit=702%2C615&amp;ssl=1" class="alignnone wp-image-44984" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.19-Oracle-WebLogic-service-deployment-settings.png?resize=439%2C385&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.19-Oracle-WebLogic-service-deployment-settings.png?w=762&amp;ssl=1 762w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.19-Oracle-WebLogic-service-deployment-settings.png?resize=300%2C263&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.19-Oracle-WebLogic-service-deployment-settings.png?resize=110%2C96&amp;ssl=1 110w" sizes="(max-width: 439px) 100vw, 439px" data-recalc-dims="1" /></p> <p>Accept the default settings and click Deploy. After some time, i.e. when the deployment has completed, the Deployments tab will be colored green:</p> <p><img data-attachment-id="44985" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-20-oracle-weblogic-service-deployment-completed/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.20-Oracle-WebLogic-service-deployment-completed.png?fit=1914%2C835&amp;ssl=1" data-orig-size="1914,835" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.20 Oracle WebLogic service deployment completed" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.20-Oracle-WebLogic-service-deployment-completed.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.20-Oracle-WebLogic-service-deployment-completed.png?fit=702%2C306&amp;ssl=1" class="alignnone wp-image-44985" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.20-Oracle-WebLogic-service-deployment-completed.png?resize=540%2C236&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.20-Oracle-WebLogic-service-deployment-completed.png?resize=1024%2C447&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.20-Oracle-WebLogic-service-deployment-completed.png?resize=300%2C131&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.20-Oracle-WebLogic-service-deployment-completed.png?resize=768%2C335&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.20-Oracle-WebLogic-service-deployment-completed.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 540px) 100vw, 540px" data-recalc-dims="1" /></p> <p>&nbsp;</p> <ul> <li><strong>Test the deployment</strong></li> </ul> <p>First, check that the image has actually been pulled in on your host, by looking at the Images tab:</p> <p><img data-attachment-id="44986" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-21-oracle-weblogic-image/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.21-Oracle-WebLogic-image.png?fit=1886%2C482&amp;ssl=1" data-orig-size="1886,482" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.21 Oracle WebLogic image" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.21-Oracle-WebLogic-image.png?fit=300%2C77&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.21-Oracle-WebLogic-image.png?fit=702%2C180&amp;ssl=1" class="alignnone wp-image-44986" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.21-Oracle-WebLogic-image.png?resize=698%2C178&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.21-Oracle-WebLogic-image.png?resize=1024%2C262&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.21-Oracle-WebLogic-image.png?resize=300%2C77&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.21-Oracle-WebLogic-image.png?resize=768%2C196&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.21-Oracle-WebLogic-image.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 698px) 100vw, 698px" data-recalc-dims="1" /></p> <p>Then, check for the container to be up-and-running in the Containers tab:</p> <p><img data-attachment-id="44987" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-22-oracle-weblogic-container/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.22-Oracle-WebLogic-container.png?fit=1890%2C474&amp;ssl=1" data-orig-size="1890,474" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.22 Oracle WebLogic container" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.22-Oracle-WebLogic-container.png?fit=300%2C75&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.22-Oracle-WebLogic-container.png?fit=702%2C176&amp;ssl=1" class="alignnone size-large wp-image-44987" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.22-Oracle-WebLogic-container.png?resize=702%2C176&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.22-Oracle-WebLogic-container.png?resize=1024%2C257&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.22-Oracle-WebLogic-container.png?resize=300%2C75&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.22-Oracle-WebLogic-container.png?resize=768%2C193&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.22-Oracle-WebLogic-container.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Now, as a final check, you&#8217;ll want to log in into the weblogic console.</p> <p>First, go to the Hosts tab, and find the public ip address:</p> <p><img data-attachment-id="44988" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-23-oracle-host-ip/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?fit=1889%2C999&amp;ssl=1" data-orig-size="1889,999" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.23 Oracle host ip" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?fit=300%2C159&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?fit=702%2C372&amp;ssl=1" class="alignnone size-large wp-image-44988" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?resize=702%2C372&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?resize=1024%2C542&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?resize=300%2C159&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?resize=768%2C406&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?resize=351%2C185&amp;ssl=1 351w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.23-Oracle-host-ip.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Then, point your browser to the familiar url, here: http://129.150.70.46:7001/console</p> <p><img data-attachment-id="44989" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/3-24-oracle-weblogic/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.24-Oracle-WebLogic.png?fit=1910%2C958&amp;ssl=1" data-orig-size="1910,958" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="3.24 Oracle WebLogic" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.24-Oracle-WebLogic.png?fit=300%2C150&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.24-Oracle-WebLogic.png?fit=702%2C352&amp;ssl=1" class="alignnone wp-image-44989" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.24-Oracle-WebLogic.png?resize=509%2C255&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.24-Oracle-WebLogic.png?resize=1024%2C514&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.24-Oracle-WebLogic.png?resize=300%2C150&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.24-Oracle-WebLogic.png?resize=768%2C385&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/3.24-Oracle-WebLogic.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 509px) 100vw, 509px" data-recalc-dims="1" /></p> <p>&#8230; and login to observe that the WebLogic server has the developer_domain, which is a clear indication that it is indeed running in our container from Docker Hub.</p> <p>&nbsp;</p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/">Docker, WebLogic Image on Oracle Container Cloud Service</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Luc Gorissen https://technology.amis.nl/?p=44937 Wed May 24 2017 10:36:29 GMT-0400 (EDT) Docker, WebLogic Images on Local Linux https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/ <p><strong>This blog series shows how to get started with WebLogic and Docker &#8211; in 3 different Clouds:</strong></p> <ul> <li><a href="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/">Docker and the Oracle Images</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/">Create and run a WebLogic Docker Image on a local machine and upload the WebLogic Docker Image into the Docker Hub registry</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/">WebLogic Docker Container on Oracle Container Cloud Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/">WebLogic Docker Container on Microsoft Azure Container Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/">WebLogic Docker Container on Amazon EC2 Container Service</a></li> </ul> <p>This blog is about creating and running a WebLogic Docker Container on a local machine and uploading the image to the Docker Hub registry.</p> <h2>Outline</h2> <p>This blog will show how to create an Oracle WebLogic Docker container image, using the official Oracle Docker images on GitHub (<a href="https://github.com/oracle/docker-images">https://github.com/oracle/docker-images</a>). Next, that image will be uploaded to the Docker Hub registry. Finally, the image from the Docker Hub registry will be run on a local machine.</p> <h2>Starting point</h2> <p>Starting point for this blog is:</p> <ul> <li>a Docker account</li> <li>an Oracle Enterprise Linux 7.3 machine, with graphical capabilities</li> </ul> <p>&nbsp;</p> <h2>Start Docker EE for Oracle Linux trial</h2> <p>First thing to do is to start a (free) 1 month trial for ‘Docker Enterprise Edition for Oracle Linux’. Log in with your Docker account and go to the Docker store (<a href="https://store.docker.com/editions/enterprise/docker-ee-server-oraclelinux/trial">https://store.docker.com/editions/enterprise/docker-ee-server-oraclelinux/trial</a>):</p> <p><img data-attachment-id="44948" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/2-1-docker-free-trial/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.1-Docker-free-trial.png?fit=1675%2C791&amp;ssl=1" data-orig-size="1675,791" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2.1 Docker free trial" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.1-Docker-free-trial.png?fit=300%2C142&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.1-Docker-free-trial.png?fit=702%2C332&amp;ssl=1" class="alignnone wp-image-44948" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.1-Docker-free-trial.png?resize=598%2C283&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.1-Docker-free-trial.png?resize=1024%2C484&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.1-Docker-free-trial.png?resize=300%2C142&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.1-Docker-free-trial.png?resize=768%2C363&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.1-Docker-free-trial.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 598px) 100vw, 598px" data-recalc-dims="1" /></p> <p>After you complete some more details and contact information, you will be on the page below:</p> <p><img data-attachment-id="44949" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/2-2-docker-get-url/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?fit=1535%2C660&amp;ssl=1" data-orig-size="1535,660" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2.2 Docker get url" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?fit=300%2C129&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?fit=702%2C302&amp;ssl=1" class="alignnone wp-image-44949" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?resize=609%2C261&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?resize=1024%2C440&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?resize=300%2C129&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?resize=768%2C330&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?w=1535&amp;ssl=1 1535w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.2-Docker-get-url.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 609px) 100vw, 609px" data-recalc-dims="1" /></p> <p>Copy <strong>YOUR</strong> URL: <a href="https://storebits.docker.com/ee/oraclelinux/sub-3495f92c">https://storebits.docker.com/ee/oraclelinux/sub-3495f92c</a>&#8230; as you will need it later.</p> <p>&nbsp;</p> <h2>Installation of Docker EE</h2> <p>&nbsp;</p> <p>I installed Docker EE on a OEL 7.3 machine. The steps are outlined below.</p> <ul> <li><strong>Check Linux Version and Kernel version</strong></li> </ul> <p>The commands below show how you can check the Linux release and Kernel version:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost ~]$ rpm -qf /etc/redhat-release oraclelinux-release-7.3-1.0.4.el7.x86_64 [developer@localhost ~]$ uname -r 4.1.12-61.1.18.el7uek.x86_64 [developer@localhost ~]$ </pre> <p>The Linux release and Kernel versions are important, as Docker EE for Oracle is certified for specific versions – a familiar topic for on-premises solutions. Note that I’m running UEK (Unbreakable Enterprise Kernel) and not RHCK (Red Hat Compatible Kernel). I proceeded with the UEK kernel, despite the fact that Docker EE is only certified for RHCK – and didn’t encounter problems. I wouldn’t recommend that for a production set-up <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <ul> <li><strong>Configure the yum repository</strong></li> </ul> <pre class="brush: bash; title: ; notranslate"> [developer@localhost ~]$ su - Password: Last login: Thu Apr 27 10:36:54 EDT 2017 on pts/0 [root@localhost ~]# vi /etc/yum yum/         yum.conf     yum.repos.d/ [root@localhost ~]# vi /etc/yum/vars/dockerurl </pre> <p>Now, paste the URL (the one you saved above) <a href="https://storebits.docker.com/ee/oralelinux/sub-3495f92c">https://storebits.docker.com/ee/oralelinux/sub-3495f92c</a>&#8230;  into the file, and save it.</p> <ul> <li><strong>Install yum-utils</strong></li> </ul> <p>Install yum-utils, which provides the yum-config-manager utility:</p> <pre class="brush: bash; title: ; notranslate"> $ sudo yum install -y yum-utils [root@localhost ~]# yum install -y yum-utils Loaded plugins: langpacks, ulninfo ol7_UEKR4                                                                                                                                    | 1.2 kB  00:00:00 ol7_latest                                                                                                                                   | 1.4 kB  00:00:00 Package yum-utils-1.1.31-40.el7.noarch already installed and latest version Nothing to do [root@localhost ~]# </pre> <ul> <li><strong>Add the stable yum repository</strong></li> </ul> <p>Use the following command to add the stable repository:</p> <pre class="brush: bash; title: ; notranslate"> [root@localhost ~]# yum-config-manager --add-repo https://storebits.docker.com/ee/oralelinux/sub-3495f92c-5a7e-4b52-b2ea-b95a8d03b9c1/docker-ee.repo&amp;lt;/pre&amp;gt; Loaded plugins: langpacks adding repo from: https://storebits.docker.com/ee/oralelinux/sub-3495f92c-5a7e-4b52-b2ea-b95a8d03b9c1/docker-ee.repo grabbing file https://storebits.docker.com/ee/oralelinux/sub-3495f92c-5a7e-4b52-b2ea-b95a8d03b9c1/docker-ee.repo to /etc/yum.repos.d/docker-ee.repo repo saved to /etc/yum.repos.d/docker-ee.repo [root@localhost ~]# </pre> <ul> <li><strong>prepare the yum cache</strong></li> </ul> <pre class="brush: bash; title: ; notranslate"> [root@localhost ~]# yum makecache fast Loaded plugins: langpacks, ulninfo docker-ee-stable-17.03                                                                                                                       | 2.9 kB  00:00:00 ol7_UEKR4                                                                                                                                    | 1.2 kB  00:00:00 ol7_latest                                                                                                                                   | 1.4 kB  00:00:00 docker-ee-stable-17.03/x86_64/primary_db                                                                                                     | 6.1 kB  00:00:00 Metadata Cache Created [root@localhost ~]# </pre> <ul> <li><strong>Install docker-ee package</strong></li> </ul> <p>Now, install docker-ee:</p> <pre class="brush: bash; title: ; notranslate"> [root@localhost ~]# yum -y install docker-ee Loaded plugins: langpacks, ulninfo Resolving Dependencies --&amp;gt; Running transaction check ---&amp;gt; Package docker-ee.x86_64 0:17.03.1.ee.3-1.el7 will be installed ... ... ... Installed: docker-ee.x86_64 0:17.03.1.ee.3-1.el7 Dependency Installed: docker-ee-selinux.noarch 0:17.03.1.ee.3-1.el7 Dependency Updated: selinux-policy.noarch 0:3.13.1-102.0.3.el7_3.16                              selinux-policy-targeted.noarch 0:3.13.1-102.0.3.el7_3.16 Complete! [root@localhost ~]# </pre> <h2>Start and test of Docker EE</h2> <p>Now it is time to test the Docker EE installation by starting the daemon and running a docker container.</p> <ul> <li><strong>Start Docker daemon</strong></li> </ul> <p>As user root:</p> <pre class="brush: bash; title: ; notranslate"> [root@localhost ~]# systemctl start docker [root@localhost ~]# </pre> <ul> <li><strong>Test docker</strong></li> </ul> <p>As user root, test by running the hello-world container image:</p> <pre class="brush: bash; title: ; notranslate"> [root@localhost ~]# docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 78445dd45222: Pull complete Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: - The Docker client contacted the Docker daemon. - The Docker daemon pulled the &amp;quot;hello-world&amp;quot; image from the Docker Hub. - The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. - The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://cloud.docker.com/ For more examples and ideas, visit: https://docs.docker.com/engine/userguide/ [root@localhost ~]# </pre> <ul> <li><strong>Running Docker as non-root user</strong></li> </ul> <p>To run Docker as a non-root user, you must add that user to the group ‘docker’. Note that this may have security implications when you do this in a production set-up.</p> <p>First, verify that the group ‘docker’ is present and then add user ‘developer’ to that group:</p> <pre class="brush: bash; title: ; notranslate"> [root@localhost ~]# grep docker /etc/group docker:x:983: [root@localhost ~]# usermod -aG docker developer [root@localhost ~]# </pre> <p>Log-in as user developer (you may first need to log-out) and then test docker:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost ~]$ whoami developer [developer@localhost ~]$ docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: - The Docker client contacted the Docker daemon. - The Docker daemon pulled the &amp;quot;hello-world&amp;quot; image from the Docker Hub. - The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. - The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://cloud.docker.com/ For more examples and ideas, visit: https://docs.docker.com/engine/userguide/ [developer@localhost ~]$ </pre> <h2>Build a WebLogic container image</h2> <p>With Docker installed on the system, we can start to build a WebLogic Docker container image. The following steps are required:</p> <ol> <li>Download the Oracle Docker image files from GitHub</li> <li>Build the Oracle JDK (Server JRE) base image</li> <li>Build the Oracle WebLogic Server install image</li> <li>Build the Oracle WebLogic Server domain image</li> </ol> <ul> <li><strong>Download Oracle Docker image files from github</strong></li> </ul> <p>In GitHub, find the Oracle Docker image files: <a href="https://github.com/oracle/docker-images">https://github.com/oracle/docker-images</a></p> <p><img data-attachment-id="44950" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/2-3-docker-github/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.3-Docker-GitHub.png?fit=1449%2C359&amp;ssl=1" data-orig-size="1449,359" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2.3 Docker GitHub" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.3-Docker-GitHub.png?fit=300%2C74&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.3-Docker-GitHub.png?fit=702%2C174&amp;ssl=1" class="alignnone size-large wp-image-44950" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.3-Docker-GitHub.png?resize=702%2C174&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.3-Docker-GitHub.png?resize=1024%2C254&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.3-Docker-GitHub.png?resize=300%2C74&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.3-Docker-GitHub.png?resize=768%2C190&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.3-Docker-GitHub.png?w=1449&amp;ssl=1 1449w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Download them and unzip them as user developer in the home directory.</p> <ul> <li><strong>Build the Oracle JDK (Server JRE) base image</strong></li> </ul> <p>Download the jre (server-jre-8u131-linux-x64.tar.gz) from <a href="http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html">http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html</a>.</p> <p>Then build the Oracle Server JRE image:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost java-8]$ pwd /home/developer/docker-images-master/OracleJava/java-8 [developer@localhost java-8]$ mv ~/Downloads/server-jre-8u131-linux-x64.tar.gz . [developer@localhost java-8]$ docker build -t oracle/serverjre:8 . Sending build context to Docker daemon 54.72 MB Step 1/5 : FROM oraclelinux:7-slim 7-slim: Pulling from library/oraclelinux 1f5b026b07bc: Pull complete Digest: sha256:fdfc68d89f73172835cc2c715084b5a754cefa230b5012f7d2e8305f19acdce9 Status: Downloaded newer image for oraclelinux:7-slim ---&amp;gt; 442ebf722584 Step 2/5 : MAINTAINER Bruno Borges &amp;lt;bruno.borges@oracle.com&amp;gt; ---&amp;gt; Running in dd5326816e4d ---&amp;gt; 97d3fa9565ae Removing intermediate container dd5326816e4d Step 3/5 : ENV JAVA_PKG server-jre-8u*-linux-x64.tar.gz JAVA_HOME /usr/java/default ---&amp;gt; Running in 22cb13c0d942 ---&amp;gt; 5f4e6116a586 Removing intermediate container 22cb13c0d942 Step 4/5 : ADD $JAVA_PKG /usr/java/ ---&amp;gt; bded319e9e7d Removing intermediate container 09a592e1468e Step 5/5 : RUN export JAVA_DIR=$(ls -1 -d /usr/java/*) &amp;amp;&amp;amp;     ln -s $JAVA_DIR /usr/java/latest &amp;amp;&amp;amp;     ln -s $JAVA_DIR /usr/java/default &amp;amp;&amp;amp;     alternatives --install /usr/bin/java java $JAVA_DIR/bin/java 20000 &amp;amp;&amp;amp;     alternatives --install /usr/bin/javac javac $JAVA_DIR/bin/javac 20000 &amp;amp;&amp;amp;     alternatives --install /usr/bin/jar jar $JAVA_DIR/bin/jar 20000 ---&amp;gt; Running in 3a8c6176ff4f ---&amp;gt; 26377fc400d6 Removing intermediate container 3a8c6176ff4f Successfully built 26377fc400d6 [developer@localhost java-8]$ </pre> <ul> <li><strong>Build the Oracle WebLogic Server install image</strong></li> </ul> <p>Download files:</p> <ul> <li>WebLogic ‘fmw_12.2.1.0.0_wls_quick_Disk1_1of1.zip’ from <a href="http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html">http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html</a></li> <li>Java JRE ‘server-jre-8uXX-linux-x64.tar.gz’ from <a href="http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html">http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html</a> (the same one as above)</li> </ul> <p>Then build the Oracle WebLogic Server install image:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost 12.2.1]$ pwd /home/developer/docker-images-master/OracleWebLogic/dockerfiles/12.2.1 [developer@localhost 12.2.1]$ mv ~/Downloads/fmw_12.2.1.0.0_wls_quick_Disk1_1of1.zip . [developer@localhost 12.2.1]$ mv ~/Downloads/server-jre-8u131-linux-x64.tar.gz . [developer@localhost 12.2.1]$ cp Dockerfile.developer  Dockerfile [developer@localhost 12.2.1]$ docker build -t oracle/weblogic:12.2.1-developer . Sending build context to Docker daemon 276.1 MB Step 1/10 : FROM oracle/serverjre:8 ---&amp;gt; 26377fc400d6 Step 2/10 : MAINTAINER Bruno Borges &amp;lt;bruno.borges@oracle.com&amp;gt; … … Successfully built 98fd41ed6652 [developer@localhost 12.2.1]$ </pre> <p>Now, images are:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost 12.2.1]$ docker images REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE oracle/weblogic     12.2.1-developer    98fd41ed6652        5 minutes ago       1.06 GB oracle/serverjre    8                   26377fc400d6        33 minutes ago      266 MB oraclelinux         7-slim              442ebf722584        6 days ago          114 MB hello-world         latest              48b5124b2768        3 months ago        1.84 kB [developer@localhost 12.2.1]$ </pre> <ul> <li><strong>Build the Oracle WebLogic Server domain image</strong></li> </ul> <p>Build te Oracle WebLogic Server domain image. Note that I chose to build an image with the domain named ‘developer_domain’. So, when later on, I start a container from this image and see the domain named ‘developer_domain’, I know that it is really from the image I built myself.</p> <p>The image is named ‘1221-domain’:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost 1221-domain]$ pwd /home/developer/docker-images-master/OracleWebLogic/ssamples/1221-domain [developer@localhost 1221-domain]$ docker build -t 1221-domain --build-arg ADMIN_PASSWORD=welcome01 --build-arg DOMAIN_NAME=developer_domain . Sending build context to Docker daemon 27.14 kB Step 1/17 : FROM oracle/weblogic:12.2.1-developer ---&amp;gt; 98fd41ed6652 Step 2/17 : MAINTAINER Bruno Borges &amp;lt;bruno.borges@oracle.com&amp;gt; … … Successfully built 10e8405f95fa [developer@localhost 1221-domain]$ </pre> <h2>Run and Test theWebLogic container image</h2> <p>Running a container from this image is quite simple. The container is named wlsadmin, container port 7001 is mapped to port 7001 on the local machine:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost 1221-domain]$ docker run -d  --name wlsadmin -p 7001:7001 1221-domain 41cb5ee31b1fc0076e0b281cd0a4cd72744b7bc5855b1412a3c0cdd602b61725 </pre> <p>Verify that the container is running:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost 1221-domain]$ docker container list CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                                                  NAMES 41cb5ee31b1f        1221-domain         &amp;quot;startWebLogic.sh&amp;quot;   29 seconds ago      Up 28 seconds       5556/tcp, 7002/tcp, 8453/tcp, 0.0.0.0:7001-&amp;gt;7001/tcp   wlsadmin [developer@localhost 1221-domain]$ </pre> <p>And the ultimate test is to point a browser to the well-known url <a href="http://localhost:7001/console">http://localhost:7001/console</a> and watch the WebLogic login screen appear!</p> <h2>Stop the WebLogic container</h2> <p>Stop the container using (part of) the container ID:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost ~]$ docker container list CONTAINER ID        IMAGE               COMMAND              CREATED              STATUS              PORTS                                                  NAMES e283cbcebca9        1221-domain         &amp;quot;startWebLogic.sh&amp;quot;   About a minute ago   Up About a minute   5556/tcp, 7002/tcp, 8453/tcp, 0.0.0.0:7001-&amp;gt;7001/tcp   trusting_beaver [developer@localhost ~]$ docker stop e28 e28 [developer@localhost ~]$ </pre> <h2>Prepare a Docker Hub registry</h2> <p>We want to store the WebLogic container image that we created in the previous part in a Docker container registry. That should make this image available for running in the Oracle, Microsoft and Amazon clouds. The obvious choice is to use Docker Hub as a registry.</p> <p>First, log in into Docker Cloud (https://hub.docker.com) and use your Docker account to login:</p> <p><img data-attachment-id="44951" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/2-4-docker-hub-create/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.4-Docker-Hub-create.png?fit=1743%2C565&amp;ssl=1" data-orig-size="1743,565" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2.4 Docker Hub create" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.4-Docker-Hub-create.png?fit=300%2C97&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.4-Docker-Hub-create.png?fit=702%2C228&amp;ssl=1" class="alignnone size-large wp-image-44951" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.4-Docker-Hub-create.png?resize=702%2C228&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.4-Docker-Hub-create.png?resize=1024%2C332&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.4-Docker-Hub-create.png?resize=300%2C97&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.4-Docker-Hub-create.png?resize=768%2C249&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.4-Docker-Hub-create.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Click on &#8216;Create Repository&#8217; (remember: a repository is a part of a registry where images are stored that have the same name but different tags):</p> <p><img data-attachment-id="44958" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/2-5-docker-hub-create-registry/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.5-Docker-Hub-create-registry.png?fit=1710%2C768&amp;ssl=1" data-orig-size="1710,768" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2.5 Docker Hub create registry" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.5-Docker-Hub-create-registry.png?fit=300%2C135&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.5-Docker-Hub-create-registry.png?fit=702%2C315&amp;ssl=1" class="alignnone size-large wp-image-44958" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.5-Docker-Hub-create-registry.png?resize=702%2C315&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.5-Docker-Hub-create-registry.png?resize=1024%2C460&amp;ssl=1 1024w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.5-Docker-Hub-create-registry.png?resize=300%2C135&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.5-Docker-Hub-create-registry.png?resize=768%2C345&amp;ssl=1 768w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.5-Docker-Hub-create-registry.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>Add yourself (i.e. your own user account) as a collaborator:</p> <p><img data-attachment-id="44959" data-permalink="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/2-6-docker-hub-add-collaborator/" data-orig-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.6-Docker-Hub-add-collaborator.png?fit=1648%2C552&amp;ssl=1" data-orig-size="1648,552" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="2.6 Docker Hub add collaborator" data-image-description="" data-medium-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.6-Docker-Hub-add-collaborator.png?fit=300%2C100&amp;ssl=1" data-large-file="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.6-Docker-Hub-add-collaborator.png?fit=702%2C235&amp;ssl=1" class="alignnone size-large wp-image-44959" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.6-Docker-Hub-add-collaborator.png?resize=702%2C235&#038;ssl=1" alt="" srcset="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.6-Docker-Hub-add-collaborator.png?resize=1024%2C343&amp;ssl=1 1024w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.6-Docker-Hub-add-collaborator.png?resize=300%2C100&amp;ssl=1 300w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.6-Docker-Hub-add-collaborator.png?resize=768%2C257&amp;ssl=1 768w, https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/2.6-Docker-Hub-add-collaborator.png?w=1404&amp;ssl=1 1404w" sizes="(max-width: 702px) 100vw, 702px" data-recalc-dims="1" /></p> <p>You need to be added as ‘Collaborator’ so you can upload images!</p> <p>Now, the respository is ready to be used.</p> <h2>Upload the image into Docker Hub repository</h2> <p>First, tag the image with the same name that it has in the Docker Hub repository:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost ~]$ docker image list REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE 1221-domain         latest              10e8405f95fa        37 hours ago        1.06 GB oracle/weblogic     12.2.1-developer    98fd41ed6652        38 hours ago        1.06 GB oracle/serverjre    8                   26377fc400d6        38 hours ago        266 MB oraclelinux         7-slim              442ebf722584        8 days ago          114 MB hello-world         latest              48b5124b2768        3 months ago        1.84 kB [developer@localhost ~]$ docker tag 1221-domain:latest lgorissen/myfirstweblogic:latest [developer@localhost ~]$ </pre> <p>For uploading the image, login into the repository and push the image:</p> <pre class="brush: bash; title: ; notranslate"> [developer@localhost ~]$ [developer@localhost ~]$ docker login Username: lgorissen Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one. Password: Login Succeeded [developer@localhost ~]$ docker push lgorissen/myfirstweblogic The push refers to a repository [docker.io/lgorissen/myfirstweblogic] bdf62266c46a: Pushed 018ffe8b5f56: Pushed 1b2e609eea7b: Pushed 091f64d4e188: Pushed 4ccdb37e8c17: Pushed b94907830dcf: Pushed latest: digest: sha256:0a38df39cdabe4b235e4547b5eaf7af4d2ea163e7bc8bc1bf2e5c333091a7042 size: 1582 [developer@localhost ~]$ </pre> <p>Now, verify in your Docker Hub repository that the image is actually there…</p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/">Docker, WebLogic Images on Local Linux</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Luc Gorissen https://technology.amis.nl/?p=44935 Wed May 24 2017 10:35:31 GMT-0400 (EDT) Docker, Oracle Images and Cloud https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/ <h2>Overview</h2> <p>Oracle is embracing Docker &#8211; just like many other companies &#8211; as the de-facto standard in Container technologies. It has resulted in the certification of various Oracle products for running in Docker containers and even Oracle supported Docker images are available. Furthermore, Oracle offers 2 Cloud Service around containers: the Container Cloud Service is a generic service that offers a platform for running your containers. Next to that, Oracle offers the Application Container Cloud Service that is targeted to running Java SE, Node.JS, php and python applications. The Application Container Cloud Service is left out-of-scope.</p> <p><strong>This blog series shows how to get started with WebLogic and Docker &#8211; in 3 different Clouds:</strong></p> <ul> <li><a href="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/">Docker and the Oracle Images</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-images-local-linux/">Create and run a WebLogic Docker Image on a local machine and upload the WebLogic Docker Image into the Docker Hub registry</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-oracle-container-cloud-service/">WebLogic Docker Container on Oracle Container Cloud Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-microsoft-azure-container-service/">WebLogic Docker Container on Microsoft Azure Container Service</a></li> <li><a href="https://technology.amis.nl/2017/05/24/docker-weblogic-image-amazon-ec2-container-service/">WebLogic Docker Container on Amazon EC2 Container Service</a></li> </ul> <p><img data-attachment-id="44929" data-permalink="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/1-1-overview/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.1-Overview.png?fit=985%2C537&amp;ssl=1" data-orig-size="985,537" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1.1 Overview" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.1-Overview.png?fit=300%2C164&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.1-Overview.png?fit=702%2C383&amp;ssl=1" class="alignnone wp-image-44929" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.1-Overview.png?resize=596%2C325&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.1-Overview.png?w=985&amp;ssl=1 985w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.1-Overview.png?resize=300%2C164&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.1-Overview.png?resize=768%2C419&amp;ssl=1 768w" sizes="(max-width: 596px) 100vw, 596px" data-recalc-dims="1" /></p> <p>All cases describe the minimal steps to get a WebLogic container up and running: nothing fancy, very minimalistic, just to get you going.</p> <p>The approach for the Cloud use cases is similar for all 3 Cloud providers:</p> <ul> <li>get your container platform up and running (the &#8216;Container Service&#8217; in the cloud)</li> <li>start a WebLogic container from the image that we have first put on Docker Hub</li> </ul> <p>Some findings of the work done can be found at the bottom of this article.</p> <p>&nbsp;</p> <h2>Docker Overview</h2> <p>Even though this article is not intended as a Docker tutorial, below an overview of Docker concepts and terminology. That should be enough to get you moving if you&#8217;re new to this whole Docker containers thingies.</p> <p><strong>Docker container</strong></p> <p>A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. A Docker container addresses the &#8216;runs-on-my-machine&#8217; problem: it is a complete package that runs on any machine. In doing so, it also simplifies your CI/CD solution.</p> <p><strong>Docker container vs virtualization</strong></p> <p>The biggest difference between Docker containers and virtualization solutions like Oracle VM is that a Docker container does not have a guest OS on board:</p> <p><img data-attachment-id="44930" data-permalink="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/1-2-container-vs-virtualization/" data-orig-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.2-Container-vs-Virtualization.png?fit=936%2C417&amp;ssl=1" data-orig-size="936,417" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1.2 Container vs Virtualization" data-image-description="" data-medium-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.2-Container-vs-Virtualization.png?fit=300%2C134&amp;ssl=1" data-large-file="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.2-Container-vs-Virtualization.png?fit=702%2C313&amp;ssl=1" class="alignnone wp-image-44930" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.2-Container-vs-Virtualization.png?resize=646%2C288&#038;ssl=1" alt="" srcset="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.2-Container-vs-Virtualization.png?w=936&amp;ssl=1 936w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.2-Container-vs-Virtualization.png?resize=300%2C134&amp;ssl=1 300w, https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.2-Container-vs-Virtualization.png?resize=768%2C342&amp;ssl=1 768w" sizes="(max-width: 646px) 100vw, 646px" data-recalc-dims="1" /></p> <p>The above diagram is best described as &#8216;where Virtualization offer OS isolation, Docker containers offer process isolation&#8217;. That does imply that Virtualization offers better security: the &#8216;isolution&#8217; is at a lower level in the stack, thus making it less vulnerable.</p> <p><strong>Docker terminology</strong></p> <p>Docker made the diagram below, which illustrates the moving parts in a Docker setup:</p> <p><img data-attachment-id="44931" data-permalink="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/1-3-docker-architecture/" data-orig-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?fit=1173%2C615&amp;ssl=1" data-orig-size="1173,615" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1.3 Docker Architecture" data-image-description="" data-medium-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?fit=300%2C157&amp;ssl=1" data-large-file="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?fit=702%2C368&amp;ssl=1" class="alignnone wp-image-44931" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?resize=630%2C330&#038;ssl=1" alt="" srcset="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?resize=1024%2C537&amp;ssl=1 1024w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?resize=300%2C157&amp;ssl=1 300w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?resize=768%2C403&amp;ssl=1 768w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?resize=351%2C185&amp;ssl=1 351w, https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/1.3-Docker-Architecture.png?w=1173&amp;ssl=1 1173w" sizes="(max-width: 630px) 100vw, 630px" data-recalc-dims="1" /></p> <ul> <li><strong>Registry</strong>: a store for container Images</li> <li><strong>Repository</strong>: a set of different Docker Images with the same name and a different tag</li> <li><strong>Image</strong>: a package that defines a Container. It includes everything needed to run a container, including code, a runtime, environment variables, etc</li> <li><strong>Container</strong>: a running instance of an Image</li> <li><strong>Host</strong>: a machine running Containers</li> <li><strong>Daemon</strong>: process on the Host that manages the containers</li> <li><strong>Client</strong>: client for exchanges commands with the Daemon</li> <li><strong>Service</strong>: a group of containers that run from the same image</li> <li><strong>Swarm</strong>: a group of Docker hosts that run as a cluster. The Swarm consists of a number of Nodes and the Docker commands are handled by the Swarm Manager.</li> <li><strong>Stack</strong>: a group of Services that together are an application</li> </ul> <p>&nbsp;</p> <h2>Docker and management</h2> <p>A large scale Docker set-up needs proper management tooling. Popular candidates are:</p> <ul> <li>Docker Swarm</li> <li>Apache Mesos</li> <li>DC/OS</li> <li>Google Kubernetes</li> </ul> <p>In a cloud set-up, that choice is limited to what the cloud provider has pre-selected for you &#8211; the Microsoft Azure approach. Or, the offered Cloud interface may even hide from you the details about what management tooling is implemented: Oracle Container Cloud Service and Amazon EC2 Container Service.</p> <p>Of course, it is possible to only use the IAAS services from your Cloud provider and build up the whole Cloud Container platform yourself, similar to as if it were in your data center. For this blog series, that is out-of-scope.</p> <p>&nbsp;</p> <h2>Docker in real life</h2> <p>Before heading of quickly to your boss and promise that Docker containers will solve all of his application &#8216;packaging/deployment/CI/CD&#8217; problems, please read this section. My interpretation: <strong>using Docker in a real-life situation is more complicated than it seems at first glance.</strong></p> <p><strong>Environment</strong></p> <p>An application in a Docker container is rarely a completely isolated, stand-alone application. Normally, the application has configuration parameters that provide information on the environment that the application is running in. For example, host names, port numbers, DB urls, web service endpoints, user account names, etc. This environment specific information can be passed on to the container using environment variables. Both command-line and file-based entry is possible.</p> <p><strong>State</strong></p> <p>Docker containers by nature are stateless: a container starts, does its work for some time, and is then stopped. After the container is stopped, all of its internal state is gone. Obviously, that limits the practical usability of containers very much. The limitations are addressed by &#8216;data volumes&#8217;. A &#8216;data volume&#8217; enables the container to access a defined part of the file system of the host machine. That enables containers to persist data and also share data between containers. Best practice here is to also use separate, dedicated Data Volume Containers that share the data with other containers</p> <p><strong>Networking</strong></p> <p>Spinning up many containers also means that your networking has to be handled adequately: all traffic must be routed to the right container. The topic of Docker container networking is far beyond the scope of this blog. Please refer to the official documentation to get a first understanding: https://docs.docker.com/engine/userguide/networking/.</p> <p><strong>Security</strong></p> <p>You still have to do that yourself: Docker only delivers on &#8216;process isolation&#8217;.</p> <p><strong>Availability</strong></p> <p>Existing applications may have a high availability / clustering mechanism that doesn&#8217;t agree well with containers. For example, an active-passive set-up will not mix with scaling up through many containers. So, if you want to wrap your existing application into containers, you will have to consider this aspect.</p> <p><strong>Application architecture</strong></p> <p>Existing applications may not fit nicely into a container. Separation of state and environment data from application logic may prove to be difficult. When development of a new application is started, it is easier to take this into account up front.</p> <p><strong>Docker and Operating Systems</strong></p> <p>Containers rely on OS system calls. Therefore, mixing OS for host and container will not work. So,</p> <ul> <li>Linux host + Linux container = OK</li> <li>Windows host + windows container = OK</li> </ul> <p>However, it is possible to run a Linux container on windows. That solution is based on using the MobyLinuxVM on windows, and running a Linux container on top of that Linux VM.</p> <p>Furthermore, Kubernetes is working on a completely mixed Windows/Linux environment (https://www.mirantis.com/blog/linux-windows-living-together-total-chaos-ok-kubernetes-1-5/).</p> <p>Also note that the Windows containers implementation is currently (may 2017). E.g. Amazon claims (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_Windows.html) that they still &#8216;consider it a beta that should not be used for production environments&#8217;. So, if you want to go into that direction, you should first investigate what the current status is!</p> <p>For the time being, just beware that mixing OS-es of host and container may be complex if not impossible. In the future, this I expect this all to be solved.</p> <p>To further confuse things: windows containers can be found with 2 isolation modes:</p> <ul> <li>Windows Server Containers: share the Windows kernel between containers</li> <li>Hyper-V Containers: runs each container in a thin VM, thus offering additional isolation (security)</li> </ul> <p>&nbsp;</p> <h2>Findings</h2> <p>I don’t intend to give a full-blown comparison of the different Cloud Container solutions that I worked with. But what I found remarkable:</p> <ul> <li>Making a custom Docker image for WebLogic is easy</li> <li>All Cloud solutions were easily accessible</li> <li>Using Docker containers for running your current applications may be difficult: your application may not ‘fit into a container’ (is containerizable a word?). For new applications, it is definitely worthwhile to consider the requirement ‘has to fit in a container’</li> <li>The Microsoft approach to containers is different from Oracle and Amazon. Microsoft offers the choice between some popular container management solutions, whereas Oracle and Amazon have built their own solution</li> <li>The Oracle solution was the only solution where I didn’t have to use a command-line console to get things up-and-running. I think that Oracle has found a good abstraction level for their UI, where all the container concepts like container, image, registry, service, task, etc are available in an intuitive way</li> <li>The Amazon solution seems to me to be somewhere in between the Oracle and Microsoft approach. They have abstracted a couple of concepts like cluster, task and service into their UI, but a bit more advanced stuff has to be done using command-line on the EC2 agent machines.</li> <li>For development purposes, by application developers with relatively little knowledge of infrastructure stuff, I would recommend looking at the Oracle Container Cloud Service. Mainly because of the clear UI.</li> <li>For production purposes, I don’t have an opinion by now. The Microsoft solution has pro’s and con’s. The fact that it uses existing container management software gives you more work (bad) but also more flexibility (good) and if you run into issues, you may find more ‘google-based-support’ (good). I expect the that the Amazon solution will require some scripting and command-line stuff – which may sound bad, but which may also offer flexibility and fit well with the skills of the system administrators that will have to manage the cloud platform. The Oracle solution seems to strike a good balance between platform configurability and ‘easy-to-use’ UI. That seems to best fulfill the Cloud promise of ‘all-you-need-is-a-credit-card-and-a-browser’.</li> <li>Note that these findings cover 3 Cloud container offerings. It is not intended to be a complete overview of what is happening in the Docker container eco system. Other platform solutions, like for example Red Hat OpenShift, should also be taken into account when selecting a Docker container platform.</li> <li>…. I welcome any of your considerations as a reply to this blog – please look for the reply box somewhere below <img src="https://s.w.org/images/core/emoji/2.3/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li> </ul> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/05/24/docker-oracle-images-cloud/">Docker, Oracle Images and Cloud</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Luc Gorissen https://technology.amis.nl/?p=44927 Wed May 24 2017 10:33:19 GMT-0400 (EDT) LEAP#308 Combinational Logic 7-segment LED Driver http://blog.tardate.com/2017/05/leap308-combinational-logic-7-segment-led-driver.html <p>Ben Eater published a fantastic video/tutorial on designing a 7-segment hex decoder as an adjunct to his 8-bit breadboard computer quest. The first thought was of course “that’s an awful lot of work just to drive a 7-segment display .. lucky we don’t have to do that these days!” My next thought was naturally: “OK, now let’s build it!”. It was in fact a great excuse to dust off some combinational logic methods. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/playground/LED7Segment/CombinationalLogicDriver">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a></p> <iframe class="youtube-embed" src="https://www.youtube.com/embed/aD_J83ZpXYY" frameborder="0" allowfullscreen=""></iframe> <p><a href="https://github.com/tardate/LittleArduinoProjects/tree/master/playground/LED7Segment/CombinationalLogicDriver"><img src="http://leap.tardate.com/playground/LED7Segment/CombinationalLogicDriver/assets/CombinationalLogicDriver_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap308-combinational-logic-7-segment-led-driver.html Wed May 24 2017 07:21:42 GMT-0400 (EDT) ODTUG Kscope17 Women in Technology Event & 2017 Women in Technology Scholar http://www.odtug.com/p/bl/et/blogaid=720&source=1 Attend one of the hottest gatherings of the year – the ODTUG Kscope17 Women in Technology Event. Join men and women on Wednesday, June 28, at 12:15 PM for lunch, networking, and conversations surrounding workplace gender equality, workplace perception, work/life balance, and more. ODTUG http://www.odtug.com/p/bl/et/blogaid=720&source=1 Tue May 23 2017 10:51:57 GMT-0400 (EDT) 255 Again! https://jonathanlewis.wordpress.com/2017/05/23/255-again/ <p>There are so many things that can go wrong when you start using tables with more than 255 columns &#8211; here&#8217;s one I discovered partly because I was thinking about a client requirement, partly because I had a vague memory of a change in behaviour in 12c and <a href="http://www.soocs.de/#blog"><em><strong>Stefan Koehler</strong></em></a> pointed me to <a href="http://orasql.org/2017/02/12/intra-block-row-chaining/"><em><strong>a blog note by Sayan Malakshinov</strong></em></a> when I asked the Oak Table if anyone remembered seeing the relevant note. Enough of the roundabout route, I&#8217;m going to start with a bit of code to create a table, stick a row in it, then update that row:</p> <pre class="brush: plain; title: ; notranslate"> rem rem Script: wide_table_4.sql rem Author: Jonathan Lewis rem Dated: May 2017 rem rem Last tested rem 12.2.0.1 rem 12.1.0.2 rem 11.2.0,4 rem set pagesize 0 set feedback off spool temp.sql prompt create table t1( select 'col' || to_char(rownum,'fm0000') || ' varchar2(10),' from all_objects where rownum &lt;= 320 ; prompt col0321 varchar2(10) prompt ) prompt / spool off @temp set pagesize 40 set feedback on insert into t1 (col0010, col0280) values ('0010','0280'); commit; update t1 set col0320 ='0320'; commit; column file_no new_value m_file_no column block_no new_value m_block_no select dbms_rowid.rowid_relative_fno(rowid) file_no, dbms_rowid.rowid_block_number(rowid) block_no, dbms_rowid.rowid_row_number(rowid) row_no from t1 ; alter system flush buffer_cache; alter system dump datafile &amp;m_file_no block &amp;m_block_no; </pre> <p>So I&#8217;ve written one of those horrible scripts that write a script and then run it. The script creates a table with 320 columns and inserts a row that populates columns 10 and 280. That gets me two row pieces, one consisting of the 255 columns from columns 26 to 280 that goes in as row piece 0, the other consisting of the first 25 columns that goes in as row piece 1; the remaining 40 columns are not populated so Oracle &#8220;forgets&#8221; about them (<strong><em><a href="https://jonathanlewis.wordpress.com/2012/10/01/row-sizes-2/">&#8220;trailing nulls take no space&#8221;</a></em></strong>). The script then updates the row by setting column 320 to a non-null value.</p> <p>For convenience I&#8217;ve then generated the file and block number (and row number, just to show its head piece went in as row 1 rather than row 0) of the row and done a symbolic block dump. The question is: what am I going to see in that block dump ?</p> <h3>Answers (part 1)</h3> <p>Here&#8217;s an extract from the block dump from 11.2.0.4 (12.1.0.2 is similar) &#8211; though I&#8217;ve cut out a lot of lines reporting the NULL columns:</p> <pre class="brush: plain; title: ; notranslate"> ntab=1 nrow=2 frre=-1 fsbo=0x16 fseo=0x1e54 avsp=0x1e3e tosp=0x1f13 0xe:pti[0] nrow=2 offs=0 0x12:pri[0] offs=0x1e7a 0x14:pri[1] offs=0x1e54 block_row_dump: tab 0, row 0, @0x1e7a tl: 49 fb: -------- lb: 0x2 cc: 40 nrid: 0x014000a7.0 col 0: *NULL* col 1: *NULL* col 2: *NULL* ... col 37: *NULL* col 38: *NULL* col 39: *NULL* tab 0, row 1, @0x1e54 tl: 38 fb: --H-F--- lb: 0x2 cc: 25 nrid: 0x014000a3.0 col 0: *NULL* col 1: *NULL* col 2: *NULL* ... col 22: *NULL* col 23: *NULL* col 24: *NULL* end_of_block_dump </pre> <p>The block holds two row pieces, and the piece stored as <em>&#8220;row 1&#8221;</em> is the starting row piece (the H in the flag byte (<em><strong>fb</strong></em>) tells us this). This row piece consists of 25 columns. The next rowpiece (identified by <strong><em>nrid:</em></strong>) is row zero in block 0x014000a3 &#8211; that&#8217;s block 163 of file 5 &#8211; which is the same block as the first row piece. When we look at row zero we see that it holds 40 columns, all null; it&#8217;s pointing to a third row piece at row zero in block 0x014000a7 (file 5, block 167), and as corroboration we can also see that the flag byte has no bits set and that tells us that this is just a boring &#8220;somewhere in the middle&#8221; bit. So it looks like we have to follow the pointer to find the last 255 columns of the table. So let&#8217;s take a look at the dump of file 5 block 167:</p> <pre class="brush: plain; title: ; notranslate"> fsbo=0x14 fseo=0x1e76 avsp=0x1e62 tosp=0x1e62 0xe:pti[0] nrow=1 offs=0 0x12:pri[0] offs=0x1e76 block_row_dump: tab 0, row 0, @0x1e76 tl: 266 fb: -----L-- lb: 0x1 cc: 255 col 0: *NULL* col 1: *NULL* col 2: *NULL* ... col 251: *NULL* col 252: *NULL* col 253: *NULL* col 254: [ 4] 30 33 32 30 end_of_block_dump </pre> <p>Take note of the <em><strong>L</strong></em> in the flag byte &#8211; that tells us that we&#8217;re looking at the last row piece of a multi-piece row. It&#8217;s that last 255 columns we were looking for. The mechanics have worked as follows</p> <ul> <li>On the simple insert Oracle split the used 280 columns into (25, 255)</li> <li>On the update we grew the used column count from 280 to 320, adding 40 columns. Oracle extended the 255 column row piece to 295, then split it (40, 255) leaving 40 in the original block and migrating the 255 to a new block. So a row that could be only 2 pieces is now</li> </ul> <p>So a row that could be two pieces in one block is now three pieces spread over two blocks; and there&#8217;s worse to come. Go back to the original block dump and check the used space. A good first approximation would be to check the <em><strong>&#8220;tl:&#8221;</strong></em> (total length) value for each row &#8211; this gives you: 49 + 38 bytes; add on a couple of hundred for the general block overhead and stuff like the transaction table and you find you&#8217;ve used less than 300 bytes in the block. But I&#8217;ve got a little procedure (I published <a href="https://jonathanlewis.wordpress.com/2016/09/11/space-usage/"><em><strong>this version</strong></em></a> of it some time ago) to check for free and used space &#8211; and this is what it said about the (ASSM) segment that holds this table:</p> <pre class="brush: plain; title: ; notranslate"> Unformatted : 44 / 360,448 Freespace 1 ( 0 - 25% free) : 0 / 0 Freespace 2 ( 25 - 50% free) : 0 / 0 Freespace 3 ( 50 - 75% free) : 0 / 0 Freespace 4 ( 75 - 100% free) : 15 / 122,880 Full : 1 / 8,192 </pre> <p>Take particular note of the <em><strong>&#8220;Full&#8221;</strong></em> block at the end of the report &#8211; that&#8217;s the block where we&#8217;ve used up rather less than 300 bytes. In fact if you look again at the first block dump you&#8217;ll see the <em><strong>avsp</strong></em> (available space) and <em><strong>tosp</strong></em> (total space) figures of 0x1e3e and 0x1f13 bytes (7,742 and 7,955 bytes). There&#8217;s loads of space in the block &#8211; but the block is marked in the bitmap space management map as full. That&#8217;s really bad news.</p> <p>On the plus side 12.2 behaves differently, as noted by Sayan in his blog note. We still get the third row piece, but it&#8217;s in the same block as the first two and the block doesn&#8217;t marked as full in the bitmap.</p> <p>And there&#8217;s still more to come &#8211; but it will have to wait a little longer.</p> <p>&nbsp;</p><br /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jonathanlewis.wordpress.com/17157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jonathanlewis.wordpress.com/17157/" /></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=jonathanlewis.wordpress.com&#038;blog=491988&#038;post=17157&#038;subd=jonathanlewis&#038;ref=&#038;feed=1" width="1" height="1" /> Jonathan Lewis http://jonathanlewis.wordpress.com/?p=17157 Tue May 23 2017 08:10:07 GMT-0400 (EDT) SCAP OVAL SQL57_TEST Example For Oracle E-Business Suite https://www.integrigy.com/security-resources/scap-oval-sql57test-example-oracle-e-business-suite <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"> <p>Last week I posted a blog introducing SCAP and OVAL. Here is a quick follow-up with a link to a sql57_test example using the&nbsp;Oracle E-Business Suite - it will suffice for any Oracle database.</p> <p>A great book to read first on SCAP titled ‘Security Automation Essentials’&nbsp;for $15 on Amazon is a must read:&nbsp; <a data-jsb_prepared="0xnv34buh7" href="https://www.amazon.com/Security-Automation-Essentials-Streamlined-Communication/dp/0071772510" rel="noreferrer">https://www.amazon.com/Security-Automation-Essentials-Streamlined-Communication/dp/0071772510</a>. I would highly recommend this book to anyone interested in SCAP and much thanks to&nbsp;Witte, Cook, Kerr and Shaffer for writing it.</p> <p>If you have any questions, please contact us at&nbsp;<a data-jsb_prepared="v29nle7wx3" href="mailto:info@integrigy.com" rel="noreferrer">info@integrigy.com</a></p> <p>-Michael Miller, CISSP-ISSMP, CCSP, CCSK</p> <h3>References</h3> <div class="grammarly-disable-indicator"><a data-jsb_prepared="3ffco7lj8e" href="/security-resources/scap-oval-oracle-sql57test-example" rel="noreferrer">SCAP OVAL Oracle SQL57_TEST Example</a></div> <div class="grammarly-disable-indicator">&nbsp;</div> </div></div></div><a href="/tags/scap-oval" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">SCAP OVAL</a>, <a href="/tags/oracle-database" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Oracle Database</a>, <a href="/tags/oracle-e-business-suite" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Oracle E-Business Suite</a> mmiller 583 at https://www.integrigy.com Tue May 23 2017 07:54:55 GMT-0400 (EDT) LEAP#307 Boldport Matrix Keypad Control http://blog.tardate.com/2017/05/leap307-boldport-matrix-keypad-control.html <p>So… ways to get arbitrary messages onto the Boldport Club Matrix? I happen to have a KeyboardMatrixModule that is coincidentally 5 keys high by 4 wide .. a number that neatly fits into the 24x5 display port of the Matrix. So I’ve wired it up and enabled a couple of commands to edit a message and start it scrolling. It is somewhat tedious, but it works! As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/TheMatrix/KeypadControl">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a></p> <iframe class="youtube-embed" src="https://www.youtube.com/embed/qg2Bs1Q0ACw" frameborder="0" allowfullscreen=""></iframe> <p><a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/TheMatrix/KeypadControl"><img src="http://leap.tardate.com/BoldportClub/TheMatrix/KeypadControl/assets/KeypadControl_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap307-boldport-matrix-keypad-control.html Tue May 23 2017 02:45:02 GMT-0400 (EDT) Where in the World is Geek Goth Girl- Week 21 http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/ <div id="tweetbutton6794" class="tw_button" style="float:left;margin-right:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fdbakevlar.com%2F2017%2F05%2Fworld-geek-goth-girl-week-21%2F&amp;text=RT%20%40DBAKevlar%20%40DBAKevlar%20%3A&amp;related=DBAKevlar:DBA+Kevlar&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdbakevlar.com%2F2017%2F05%2Fworld-geek-goth-girl-week-21%2F" class="twitter-share-button" style="width:55px;height:22px;background:transparent url('http://dbakevlar.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat 0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><div class="pf-content"><p>Happy <a href="http://worldgothday.com/">National Goth Day</a>!  Although I consider myself &#8220;Goth Lite&#8221;, it&#8217;s a national holiday in my little world and I&#8217;m pondering what books I&#8217;ll write after I run out of tech titles.  Needless to say, I&#8217;ve chosen the title, &#8220;<strong>Staying Geeky and Goth After 50</strong>&#8221; and chosen the following for the cover art:</p> <p><a href="http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/old_goth/" rel="attachment wp-att-6795"><img class="alignnone size-full wp-image-6795" src="https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/05/old_goth.jpg?resize=236%2C286" alt="" data-recalc-dims="1" /></a></p> <p>I&#8217;m considering adding a black choker to Ma Goth and maybe some facial piercings to Pa- we&#8217;ll see.</p> <p>As May winds down, I look forward to a vacation in Paris the beginning of June with my favorite person, Tim Gorman.  As much as we travel together, we rarely get to see much of each other while at an event and are both looking forward to some downtime to just spend together.</p> <p>After last week&#8217;s <a href="http://www.dbta.com/DataSummit/2017/">Data Summit 2017</a>, <a href="http://www.dbta.com/BigDataQuarterly/Articles/Tips-for-Database-Management-and-Migration-in-the-Cloud-118290.aspx">DBTA did a wonderful write up</a> on my session, but as I&#8217;m my worst critic, let me know I needed to do a better job of relaying my message to the community, as in the article, not one mention of the importance of virtualization in removing that pesky bottleneck of data from cloud migrations.  I greatly appreciate the opportunity to speak at this awesome event and shall promise to do better next time&#8230; <img src="https://s.w.org/images/core/emoji/2.2.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p>For week 21 of the year, I&#8217;m off to sunny Phoenix, Arizona to <a href="https://www.dataplatforms.com/">Data Platforms 2017</a>.</p> <p><a href="http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/screen-shot-2017-05-22-at-10-13-44-am/" rel="attachment wp-att-6796"><img class="alignnone size-large wp-image-6796" src="https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-22-at-10.13.44-AM.png?resize=600%2C159" alt="" srcset="https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-22-at-10.13.44-AM.png?resize=1024%2C271 1024w, https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-22-at-10.13.44-AM.png?resize=300%2C79 300w, https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-22-at-10.13.44-AM.png?resize=768%2C203 768w, https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-22-at-10.13.44-AM.png?w=1264 1264w, https://i2.wp.com/dbakevlar.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-22-at-10.13.44-AM.png?w=1200 1200w" sizes="(max-width: 600px) 100vw, 600px" data-recalc-dims="1" /></a></p> <p>This is an incredible event focused on data operations and no other event that I&#8217;ve seen better speak to the power of DevOps, automation and the power of visualizing a future of data at the speed of business than through virtualization.  I&#8217;m going to be <a href="https://www.dataplatforms.com/agenda/session/181331">speaking</a> at one session, focused on some of our solutions for virtualizing everything, not just the database.  We all know there are bottlenecks everywhere to getting to the cloud, automating and data in general and a number of solutions are a focus for getting away from the RDBMS, but in reality, it&#8217;s just moved the resource hit. We also know that databases don&#8217;t have sole ownership on complexity.  I&#8217;ll try to shed some light on how to lighten the load across the database, applications, flat files and anything else possible to make life for the next generation of technologist a piece of cake.</p> <p>Again-  Happy National Goth Day!!</p> <p><a href="http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/death_chest/" rel="attachment wp-att-6797"><img class="alignnone size-full wp-image-6797" src="https://i1.wp.com/dbakevlar.com/wp-content/uploads/2017/05/death_chest.gif?resize=400%2C252" alt="" data-recalc-dims="1" /></a></p> <p>&nbsp;</p> <p>&nbsp;</p> <!-- Easy Plugin for AdSense Unfiltered [count: 3 is not less than 3] --></div><br><br><img src="https://i2.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/ico-tag.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> Tags:&nbsp;&nbsp;<a href="http://dbakevlar.com/tag/where-in-the-world/" rel="tag">Where in the World</a><br><br><div style="width:100%"><table align="left" width="100%" cellspacing="0" cellpadding="0" bgcolor="#f1f1f1" border="0px;"> <tbody> <tr bgcolor="#ffffff"><td align="center" width="17%" valign="top"> <span class="sb_title">Del.icio.us</span><br> <a href="http://del.icio.us/post?url=http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/&title=Where in the World is Geek Goth Girl- Week 21"> <img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/delicious.gif?w=600" border="0" align="absmiddle" data-recalc-dims="1"> </a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">Facebook</span><br> <a href="http://www.facebook.com/share.php?u=http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/"><img src="https://i0.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/facebook_icon.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">TweetThis</span><br> <a href="http://twitthis.com/twit?url=http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/&title=Where in the World is Geek Goth Girl- Week 21"><img src="https://i2.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tweet.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">Digg</span><br> <a href="http://digg.com/submit?phase=2&url=http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/&title=Where in the World is Geek Goth Girl- Week 21"><img src="https://i0.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/digg.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td><td align="center" width="17%" valign="top"> <span class="sb_title">StumbleUpon</span><br> <a href="http://www.stumbleupon.com/submit?url=http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/&title=Where in the World is Geek Goth Girl- Week 21"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/stumble.gif?w=600" border="0" align="absmiddle" data-recalc-dims="1"></a> </td></tr> </tbody></table></div><br><div style="clear:both"></div><div style="background:#EEEEEE; padding:0px 0px 0px 15px; margin:10px 0px 0px 0px;"><div style="padding:5px 0px 5px 0px;"><b>Comments:</b>&nbsp;&nbsp;<a href="http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/#respond">0 (Zero), Be the first to leave a reply!</a></div><br><div style="clear:both"></div><div style="padding:13px 0px 5px 0px;"><span style="border-bottom:1px dashed #003399;padding-bottom:4px;"><strong>You might be interested in this:</strong></span>&nbsp;&nbsp;<br><ul style="margin:0; padding:0; padding-top:10px; padding-bottom:5px;"><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2017/03/swingbench-aws-trial/" >Swingbench with the AWS Trial</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2013/09/metrics-vs-statistics/" >Metrics vs Statistics</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2016/08/will-the-real-revolutionary-in-data-virtualization-please-stand-up/" >Will the Real Revolutionary in Data Virtualization Please, Stand Up</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2012/11/how-to-apply-an-ebs-patch/" >How to Apply an EBS Patch</a></li><li style="list-style-type: none;"><img src="https://i1.wp.com/dbakevlar.com/wp-content/plugins/readers-from-rss-2-blog/wpsmartapps-lic/images/tick.png?w=600" border="0" align="absmiddle" data-recalc-dims="1"> &nbsp;<a href="http://dbakevlar.com/2015/09/delphix-express-free-version-of-delphix-available/" >Delphix Express : Free version of Delphix available</a></li></ul></div></div><hr style="color:#EBEBEB" /><small>Copyright © <a href="http://dbakevlar.com">DBA Kevlar</a> [<a href="http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/">Where in the World is Geek Goth Girl- Week 21</a>], All Right Reserved. 2017.</small><br><p>The post <a rel="nofollow" href="http://dbakevlar.com/2017/05/world-geek-goth-girl-week-21/">Where in the World is Geek Goth Girl- Week 21</a> appeared first on <a rel="nofollow" href="http://dbakevlar.com">DBA Kevlar</a>.</p> dbakevlar http://dbakevlar.com/?p=6794 Mon May 22 2017 12:31:33 GMT-0400 (EDT) Legacy users get ORA-01017 in 12.2 http://laurentschneider.com/wordpress/2017/05/legacy-users-get-ora-01017-in-12-2.html <p>The default case insensitive string disappeared in 12cR2, let&#8217;s call it the 10G string in this post, but it was the same since Oracle 7 at least. It was introduced in V5 or V6 to replace clear-text passwords. </p> <p>What&#8217;s happening then with my ultra-old-accounts?</p> <p>You could well set a new password (or the same password again) to each account to be migrated in 11g/12cR1 before moving to 12cR2. </p> <p>If nobody knows the password and nobody can change it because it is hardcoded in the application and neither easy to read (hidden / obfuscated /encrypted) nor to change, then, you are in TROUBLE ! This is documented in <a href="https://support.oracle.com/epmos/faces/DocumentDisplay?id=2075401.1">Note 2075401.1</a></p> <p>First disclaimer : it is a good thing to achieve a better security. SHA1 and SHA2 are <b>a lot</b> better than the oldstyle-longly-hacked-unsalted-case-insensitive-homemade-algorythm. SHA3 has been published in 2015 and it not used in Oracle 12cR2 yet. SHA2 is a bit older (2001) but still recommended. SHA1 is oldish (1995) and no-longer-recommended, collision has been detected. Read more on <a href="https://en.wikipedia.org/wiki/SHA-1#Comparison_of_SHA_functions">wikipedia</a> or <a href="https://www.crypto101.io/" class="broken_link">crypto101</a></p> <p>SHA-1 was a really <b>huge</b> improvement when introduced in gR1. The old self-made algorythm has been a torture for Oracle Security team. It has been published on Internet. Extremly powerfull password cracker can find your &#8220;not-too-long&#8221; password in notime. In 11g, Oracle removed the 10g String from the DBA_USERS view. I wrote about this <a href="http://laurentschneider.com/wordpress/2008/03/alter-user-identified-by-values-in-11g.html">here</a>. It remained on the base table, USER$ until 12cR2. Now Oracle completly removed it by default in 12cR2. 10 years after SHA1 was introduced in 11gR1. </p> <p>Still. You are the dba. You want to migrate your database not to chase passwords.</p> <p>You could edit your sqlnet.ora to allow 10g strings.<br /> <pre><code> SQLNET.ALLOWED_LOGON_VERSION_SERVER=11 </code></pre></p> <p>This works<br /> <pre><code> SQL&gt; sho parameter sec_case_sensitive_logon NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUE ------------------------- ----- sec_case_sensitive_logon&nbsp;&nbsp;FALSE SQL&gt; CREATE USER &quot;U&quot; IDENTIFIED BY &nbsp;&nbsp;&nbsp;&nbsp; VALUES &#039;DC6F2B33D359A95B&#039;; User created. SQL&gt; grant create session to u; Grant succeeded. SQL&gt; conn u/abcdefg@pdb01 Connected. SQL&gt; conn u/AbCdEfG@pdb01 Connected. </code></pre> </p> <p>If you have SQLNET.ALLOWED_LOGON_VERSION_SERVER=11, then you could keep the same setting of sec_case_sensitive_logon as in 11g. I recommmend the default (true).</p> <p>But, that&#8217;s it ? Wellllllll&#8230; not sure.</p> <p>In 12.1<br /> <pre><code> SQL&gt; select dbms_metadata.get_ddl(&#039;USER&#039;,&#039;U&#039;) from dual DBMS_METADATA.GET_DDL(&#039;USER&#039;,&#039;U&#039;) ---------------------------------- &nbsp;&nbsp; CREATE USER &quot;U&quot; IDENTIFIED BY &nbsp;&nbsp;&nbsp;&nbsp; VALUES &#039;DC6F2B33D359A95B&#039; </code></pre></p> <p>Let&#8217;s try in 12.2<br /> <pre><code> SQL&gt; select dbms_metadata.get_ddl(&#039;USER&#039;,&#039;U&#039;) from dual DBMS_METADATA.GET_DDL(&#039;USER&#039;,&#039;U&#039;) ------------------------------------ CREATE USER &quot;U&quot; IDENTIFIED BY VALUES &nbsp;&nbsp;&#039;S:0000000000000000000000000000000 00000000000000000000000000000&#039; </code></pre></p> <p>While this is a perfectly working syntax, and IDENTIFIED BY VALUES is <font color="red">not supported <font size="1">*</font></font>. So if create that user, then, obviously, the 10G string is lost.</p> <p>Well, unsupported feature then? Hmm, yes. You should never have used identified by values. </p> <p>Ok, so if I refresh my Test database with Production data, how can I save test passwords? You can&#8217;t. At least not in a supported way by using identified by values. </p> <p>You could something like :<br /> <pre><code> SQL&gt; select &#039;alter user &quot;&#039;||name|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#039;&quot; identified by values &#039;&#039;&#039;|| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; password||&#039;&#039;&#039;;&#039; txt &nbsp;&nbsp;&nbsp;&nbsp; from user$, v$instance &nbsp;&nbsp;&nbsp;&nbsp; where version &gt; &#039;12.2&#039; &nbsp;&nbsp;&nbsp;&nbsp; and spare4 is null&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; and type# = 1 &nbsp;&nbsp;&nbsp;&nbsp; and regexp_like(PASSWORD,&#039;[A-F0-9]{16}&#039;); txt ----------------------------------- alter user &quot;U&quot; identified by values &nbsp;&nbsp; &#039;DC6F2B33D359A95B&#039;; </code></pre></p> <p>This may work. In 12.2.0.1. Maybe not in 13. Maybe not in 12.2.0.1.0PSU July. It&#8217;s not supported. If it does not work, it is NOT-A-BUG.</p> <p>The SHA1 was introduced 10 years ago in Oracle 11gR1. If you have not changed your password in ten years, and you don&#8217;t know how many employees and ex-employees know this password, and it is case-insensitive, and its &#8220;pseudo-hashing-algorythm&#8221; has been hacked for maybe two decades, yet, I can only warmly recommend to change those accounts passwords ! </p> <p>Again: so if I refresh my Test database with Production data, how can I save test passwords ?<br /> If I were you I would design a better system for login. For human users, use global users and an Identity solution, like Oracle Universal directory. For technical account, build yourself a tool that generate a random password, and update the user and credentials, something like</p> <p><code><br /> select<br /> substr(<br /> REGEXP_REPLACE(<br /> UTL_RAW.cast_to_varchar2(<br /> SYS.DBMS_CRYPTO.RANDOMBYTES (1024)<br /> ) ,'[^!#-~]'<br /> ),<br /> 1,<br /> 20<br /> ) PW<br /> from dual;<br /> PW<br /> --------------------<br /> %K0w(^%UN.B82Yjjfu{?<br /> <code></p> <p>And use it to reset your technical user and to configure your application credentials. </p> <p><font color="red"><font size="1">*</font></font> <i>Note 554605.1: the 'IDENTIFIED BY VALUES' clause on a CREATE/ALTER USER statement is not officially documented, and is intended purely for internal </i></p> Laurent Schneider http://laurentschneider.com/?p=2453 Mon May 22 2017 10:50:17 GMT-0400 (EDT) Generating a Data Dictionary Report and Diagram for a SubView http://www.thatjeffsmith.com/archive/2017/05/generating-a-data-dictionary-report-and-diagram-for-a-subview/ <p>Your relational models can get big. Bigger than the human mind can easily consume. So instead of generating a report of 2,500 objects, you might want to break down your model to smaller chunks, AKA <a href="https://www.thatjeffsmith.com/archive/tag/subview/" target="_blank">SubViews</a>.</p> <div id="attachment_6176" style="width: 752px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-1.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-1-1024x523.png" alt="" width="742" height="379" class="size-large wp-image-6176" /></a><p class="wp-caption-text">All I want is a report of the HR or &#8216;blue&#8217; stuff.</p></div> <p>So let&#8217;s open the reports, which you&#8217;ll find on the main File menu.</p> <div id="attachment_6177" style="width: 476px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report1.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report1.png" alt="" width="466" height="628" class="size-full wp-image-6177" /></a><p class="wp-caption-text">Two things here to pay attention to.</p></div> <p>First, we don&#8217;t want the main diagram in the report, that&#8217;ll give us EVERYTHING. I just want the subview diagram.</p> <p>So after un-checking &#8216;include main diagram,&#8217; we need to go look at the &#8216;Objects&#8217; page.</p> <div id="attachment_6178" style="width: 476px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report2.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report2.png" alt="" width="466" height="628" class="size-full wp-image-6178" /></a><p class="wp-caption-text">We need to create a new Report Configuration.</p></div> <p>Now we can define a reporting configuration that defines which objects we want included.</p> <div id="attachment_6179" style="width: 730px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report3.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report3.png" alt="" width="720" height="690" class="size-full wp-image-6179" /></a><p class="wp-caption-text">Give it a name, click on &#8216;subviews&#8217;, click over the subview(s) you want included, then save the configuration.</p></div> <p>With our configuration saved and now available, we can go back and select it from the Objects panel.</p> <div id="attachment_6180" style="width: 464px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report4.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report4.png" alt="" width="454" height="230" class="size-full wp-image-6180" /></a><p class="wp-caption-text">Depending on how big your subview is, this could take a second or 3.</p></div> <h3>And Our Report!</h3> <div id="attachment_6181" style="width: 752px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report5.png"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/subview-report5-1024x790.png" alt="" width="742" height="572" class="size-large wp-image-6181" /></a><p class="wp-caption-text">Data dictionary info AND our subview diagram &#8211; all in one HTML report.</p></div> <p>Note I generated this using 4.2.0.17 of SQL Developer. Also note I noticed there&#8217;s a bug where the Subview Diagram links in the navigation bar to the left don&#8217;t work. Thankfully the object links work for the data dictionary bits, and you can just scroll down to the diagram.</p> <p>If we had included the main diagram (remember when we unchecked that box?), our report would have two diagrams instead of just the one here for the SubView.</p> <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --> thatjeffsmith http://www.thatjeffsmith.com/?p=6174 Mon May 22 2017 09:19:35 GMT-0400 (EDT) LEAP#303 Keyboard Matrix Module http://blog.tardate.com/2017/05/leap303-keyboard-matrix-module.html <p>I picked up one of these 4x4 Independent Keyboard Matrix modules to see how useful it might be for arbitrary input with a microcontroller. I examine how it is constructed, and provide some examples of how to make it work: <a href="https://github.com/tardate/LittleArduinoProjects/blob/master/playground/KeyboardMatrixModule/LedControl">LedControl</a> - controlling the LEDs; <a href="https://github.com/tardate/LittleArduinoProjects/blob/master/playground/KeyboardMatrixModule/KeyMatrixInput">KeyMatrixInput</a> - multiplexed key input; <a href="https://github.com/tardate/LittleArduinoProjects/blob/master/playground/KeyboardMatrixModule/SwitchInterrupts">SwitchInterrupts</a> - interrupt-driven switch input. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/playground/KeyboardMatrixModule">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/playground/KeyboardMatrixModule"><img src="http://leap.tardate.com/playground/KeyboardMatrixModule/assets/KeyboardMatrixModule_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap303-keyboard-matrix-module.html Mon May 22 2017 08:52:05 GMT-0400 (EDT) Node.js run from GitHub in Generic Docker Container backed by Dockerized Redis Cache https://technology.amis.nl/2017/05/22/node-js-run-from-github-in-generic-docker-container-backed-by-dockerized-redis-cache/ <p>In a previous article I talked about a generic Docker Container Image that can be used to run any Node.js application directly from GitHub or some other Git instance by feeding the Git repo url as Docker run parameter (see <a title="https://technology.amis.nl/2017/05/21/running-node-js-applications-from-github-in-generic-docker-container/" href="https://technology.amis.nl/2017/05/21/running-node-js-applications-from-github-in-generic-docker-container/">https://technology.amis.nl/2017/05/21/running-node-js-applications-from-github-in-generic-docker-container/</a>). In this article, I create a simple Node.js application that will be pushed to GitHub and run in that generic Docker container. It will use a Redis cache that is running in a separate Docker Container.</p> <p><a href="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-63.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-62.png?resize=702%2C426&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>The application does something simple: HTTP requests are handled: each request will lead to an increment of the request counter and the current value of the request counter is returned. The earlier implementation of this functionality used a local Node.js variable to keep track of the request count. This approach had two spectacular flaws: horizontal scalability (adding instances of the application fronted by a load balancer of sorts) led to strange results because each instance kept its own request counter. And a restart of the application caused the count to be reset. The incarnation we discuss in this article uses a Redis cache as a shared store for the request counter, one that will also survive the restart of the Node.js application instances. Note: of course this means Redis becomes a single point of failure, unless we cluster Redis too and/or use a persistent file as backup. Both options are available but are out of scope for this article.</p> <p>Sources for this article can be found on GitHub: <a title="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017/tree/master/part1" href="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017/tree/master/part1">https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017/tree/master/part1</a> .</p> <h3>Run Redis</h3> <p>To run a Docker Container with a Redis cache instance, we only have to execute this statement:</p> <blockquote><p>docker run -d &#8211;name redis -p 6379:6379 redis</p></blockquote> <p>We run a container based on the Docker image called redis. The container is also called redis and its internal port 6379 is exposed and mapped to port 6379 in the host. That it all it takes. The image is pulled and the container is started.</p> <p><a href="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-64.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-63.png?resize=587%2C313&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <h3>Create Node.js Application RequestCounter &#8211; Talking to Redis</h3> <p>To talk to Redis from a Node.js application, there are several modules available. The most common and generic one seems to be called <em>redis</em>. To use it, I have to install it with npm:</p> <blockquote><p>npm install redis &#8211;save</p></blockquote> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-65.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-64.png?resize=681%2C97&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>To leverage Redis in my application code, I need to require(‘redis’) and create a client connection. For that, I need the host and port for the Redis instance. The port was specified when we started the Docker container for Redis (6379) and the host ip is the ip of the Docker machine (I am running Docker Tools on Windows).</p> <p>Here is the naïve implementation of the request counter, backed by Redis. Naïve because it does not cater for race conditions between multiple instances that could each read the current counter value from Redis, each increase it and write it back, causing one or multiple counts to be potentially lost. Note that the REDIS_HOST and REDIS_PORT can be specified through environment variables (read with process.env.&lt;name of variable&gt;.</p> <pre class="brush: jscript; title: ; notranslate"> //respond to HTTP requests with response: count of number of requests // invoke from browser or using curl: curl http://127.0.0.1:PORT var http = require('http'); var redis = require(&quot;redis&quot;); var redisHost = process.env.REDIS_HOST ||&quot;192.168.99.100&quot; ; var redisPort = process.env.REDIS_PORT ||6379; var redisClient = redis.createClient({ &quot;host&quot;: redisHost, &quot;port&quot;: redisPort }); var PORT = process.env.APP_PORT || 3000; var redisKeyRequestCounter = &quot;requestCounter&quot;; var server = http.createServer(function handleRequest(req, res) { var requestCounter = 0; redisClient.get(redisKeyRequestCounter, function (err, reply) { if (err) { res.write('Request Count (Version 3): ERROR ' + err); res.end(); } else { if (!reply || reply == null) { console.log(&quot;no value found yet&quot;); redisClient.set(redisKeyRequestCounter, requestCounter); } else { requestCounter = Number(reply) + 1; redisClient.set(redisKeyRequestCounter, requestCounter); } res.write('Request Count (Version 3): ' + requestCounter); res.end(); } }) }).listen(PORT); // redisClient.quit(); console.log('Node.JS Server running on port ' + PORT + ' for version 3 of requestCounter application, powered by Redis.'); </pre> <p>&nbsp;</p> <h3>Run the Node.JS Application talking to Redis</h3> <p>The Node.js application can be run locally &#8211; from the command line directly on the Node.js runtime.</p> <p>Alternatively, I have committed and pushed the application to GitHub. Now I can run it using the generic Docker Container Image <em>lucasjellema/node-app-runner</em> that I prepared in this article: <a title="https://technology.amis.nl/2017/05/21/running-node-js-applications-from-github-in-generic-docker-container/" href="https://technology.amis.nl/2017/05/21/running-node-js-applications-from-github-in-generic-docker-container/">https://technology.amis.nl/2017/05/21/running-node-js-applications-from-github-in-generic-docker-container/</a> using a single startup command:</p> <blockquote><p>docker run -e &#8220;GIT_URL=https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&#8221; -e &#8220;APP_PORT=8080&#8221; -p 8015:8080 -e &#8220;APP_HOME=part1&#8221;  -e &#8220;APP_STARTUP=requestCounter-3.js&#8221; -e &#8220;REDIS_HOST:127.0.0.1&#8221; -e &#8220;REDIS_PORT:6379&#8221;   lucasjellema/node-app-runner</p></blockquote> <p>This command passes relevant values as environment variable &#8211; such as the GitHub Repo url, the directory in that repo and the exact script to run and also the host and port for Redis as well as the port that the Node.js application should listen at for requests. In the standard Docker way, the internal port (8080) is mapped to the external port (8015).<a href="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-66.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-65.png?resize=651%2C314&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>&nbsp;</p> <p>The application can accessed from the browser:</p> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-67.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-66.png?resize=296%2C121&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>&nbsp;</p> <h3>Less Naïve Implementation using Redis Watch and Multi for Optimistic Locking</h3> <p>Although the code shown overhead seems to be working &#8211; it is not robust. When scaling out &#8211;  multiple instances can race against each other and overwrite each other’s changes in Redis because no locking has been implemented. Based on this article: <a title="https://blog.yld.io/2016/11/07/node-js-databases-using-redis-for-fun-and-profit/#.WSGEWtwlGpo" href="https://blog.yld.io/2016/11/07/node-js-databases-using-redis-for-fun-and-profit/#.WSGEWtwlGpo">https://blog.yld.io/2016/11/07/node-js-databases-using-redis-for-fun-and-profit/#.WSGEWtwlGpo</a> I have extended the code with an optimistic locking mechanism. Additionally, the treatment of client connections is improved &#8211; reducing the chance of leaking connections.</p> <pre class="brush: jscript; title: ; notranslate"> //respond to HTTP requests with response: count of number of requests // invoke from browser or using curl: curl http://127.0.0.1:PORT // use an optmistic locking strategy to prevent race conditions between multiple clients updating the requestCount at the same time // based on https://blog.yld.io/2016/11/07/node-js-databases-using-redis-for-fun-and-profit/#.WSGEWtwlGpo var http = require('http'); var Redis = require(&quot;redis&quot;); var redisHost = process.env.REDIS_HOST || &quot;192.168.99.100&quot;; var redisPort = process.env.REDIS_PORT || 6379; var PORT = process.env.APP_PORT || 3000; var redisKeyRequestCounter = &quot;requestCounter&quot;; var server = http.createServer(function handleRequest(req, res) { increment(redisKeyRequestCounter, function (err, newValue) { if (err) { res.write('Request Count (Version 3): ERROR ' + err); res.end(); } else { res.write('Request Count (Version 3): ' + newValue); res.end(); } }) }).listen(PORT); function _increment(key, cb) { var replied = false; var newValue; var redis = Redis.createClient({ &quot;host&quot;: redisHost, &quot;port&quot;: redisPort }); // if the key does not yet exist, then create it with a value of zero associated with it redis.setnx(key, 0); redis.once('error', done); // ensure that if anything changes to the key-value pair in Redis (from a different connection), this atomic operation will fail redis.watch(key); redis.get(key, function (err, value) { if (err) { return done(err); } newValue = Number(value) + 1; // either watch tells no change has taken place and the set goes through, or this action fails redis.multi(). set(key, newValue). exec(done); }); function done(err, result) { redis.quit(); if (!replied) { if (!err &amp;&amp; !result) { err = new Error('Conflict detected'); } replied = true; cb(err, newValue); } } } function increment(key, cb) { _increment(key, callback); function callback(err, result) { if (err &amp;&amp; err.message == 'Conflict detected') { _increment(key, callback); } else { cb(err, result); } } } console.log('Node.JS Server running on port ' + PORT + ' for version 3 of requestCounter application, powered by Redis.'); </pre> <p>This Node.js application is run in exactly the same way as the previous one, using requestCounter-4.js as APP_STARTUP rather than requestCounter-3.js.</p> <blockquote><p>docker run -e &#8220;GIT_URL=https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&#8221; -e &#8220;APP_PORT=8080&#8221; -p 8015:8080 -e &#8220;APP_HOME=part1&#8221;  -e &#8220;APP_STARTUP=<strong>requestCounter-4.js</strong>&#8221; -e &#8220;REDIS_HOST:127.0.0.1&#8221; -e &#8220;REDIS_PORT:6379&#8221;   lucasjellema/node-app-runner</p></blockquote> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-68.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-67.png?resize=281%2C73&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/05/22/node-js-run-from-github-in-generic-docker-container-backed-by-dockerized-redis-cache/">Node.js run from GitHub in Generic Docker Container backed by Dockerized Redis Cache</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Lucas Jellema https://technology.amis.nl/?p=44921 Mon May 22 2017 00:41:16 GMT-0400 (EDT) Using HTTPIE with Spring Boot Rest Repositories http://feedproxy.google.com/~r/blogspot/PEqWE/~3/gr7fUyL4drw/using-httpie-with-spring-boot-rest.html I recently got introduced to HTTPIE as a command line alternative to CURL for testing RESTful api endpoints created using @RestController annotated classes. For more information on httpie follow this <a href="https://httpie.org/" target="_blank">link</a><br /><br />Before we test this out lets create a very basic Spring Boot Application with classes/interfaces to verify HTTPIE. The following assumes you have a Spring Boot application already created and it has maven dependancies as follows to enable JPA, Rest Repositories, H2 and Web support<br /><br /><span style="color: #e69138;"><i>Note: We are using Spring Boot 1.5.3 here</i></span><br /><pre class="brush: xml"> <br />&lt;parent&gt;<br /> &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br /> &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;<br /> &lt;version&gt;1.5.3.RELEASE&lt;/version&gt;<br /> &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;<br /> &lt;/parent&gt;<br /><br /> &lt;properties&gt;<br /> &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;<br /> &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;<br /> &lt;java.version&gt;1.8&lt;/java.version&gt;<br /> &lt;/properties&gt;<br /><br /> &lt;dependencies&gt;<br /> &lt;dependency&gt;<br /> &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br /> &lt;artifactId&gt;spring-boot-starter-data-rest&lt;/artifactId&gt;<br /> &lt;/dependency&gt;<br /> &lt;dependency&gt;<br /> &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br /> &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;<br /> &lt;/dependency&gt;<br /> &lt;dependency&gt;<br /> &lt;groupId&gt;org.hibernate&lt;/groupId&gt;<br /> &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;<br /> &lt;/dependency&gt;<br /> &lt;dependency&gt;<br /> &lt;groupId&gt;com.h2database&lt;/groupId&gt;<br /> &lt;artifactId&gt;h2&lt;/artifactId&gt;<br /> &lt;scope&gt;runtime&lt;/scope&gt;<br /> &lt;/dependency&gt;<br /> &lt;/dependencies&gt;<br /></pre><br />1. Create classes/interfaces as follows<br /><br /><b>Employee.java</b><br /><pre class="brush: java"> <br />package pivotal.io.boot.httpie.demo;<br /><br />import javax.persistence.Entity;<br />import javax.persistence.GeneratedValue;<br />import javax.persistence.GenerationType;<br />import javax.persistence.Id;<br /><br />@Entity<br />public class Employee<br />{<br /> @Id<br /> @GeneratedValue (strategy = GenerationType.AUTO)<br /> private Long id;<br /><br /> private String firstName;<br /> private String lastName;<br /> private String job;<br /><br /> public Employee()<br /> {<br /> }<br /><br /> public Employee(String firstName, String lastName, String job) {<br /> this.firstName = firstName;<br /> this.lastName = lastName;<br /> this.job = job;<br /> }<br /><br /> public Long getId() {<br /> return id;<br /> }<br /><br /> public void setId(Long id) {<br /> this.id = id;<br /> }<br /><br /> public String getFirstName() {<br /> return firstName;<br /> }<br /><br /> public void setFirstName(String firstName) {<br /> this.firstName = firstName;<br /> }<br /><br /> public String getLastName() {<br /> return lastName;<br /> }<br /><br /> public void setLastName(String lastName) {<br /> this.lastName = lastName;<br /> }<br /><br /> public String getJob() {<br /> return job;<br /> }<br /><br /> public void setJob(String job) {<br /> this.job = job;<br /> }<br /><br /> @Override<br /> public String toString() {<br /> return "Employee{" +<br /> "id=" + id +<br /> ", firstName='" + firstName + '\'' +<br /> ", lastName='" + lastName + '\'' +<br /> ", job='" + job + '\'' +<br /> '}';<br /> }<br />}<br /></pre><br /><b>EmployeeRepository.java</b><br /><pre class="brush: java"> <br />package pivotal.io.boot.httpie.demo;<br /><br />import org.springframework.data.jpa.repository.JpaRepository;<br /><br />public interface EmployeeRepository extends JpaRepository &lt;Employee, Long&gt; {<br />} <br /></pre><br /><b>EmployeeRest.java</b><br /><pre class="brush: java"> <br />package pivotal.io.boot.httpie.demo;<br /><br />import org.apache.commons.logging.Log;<br />import org.apache.commons.logging.LogFactory;<br />import org.springframework.beans.factory.annotation.Autowired;<br />import org.springframework.web.bind.annotation.*;<br /><br />import java.util.List;<br /><br />@RestController<br />@RequestMapping ("/api/employee")<br />public class EmployeeRest<br />{<br /> private static Log logger = LogFactory.getLog(EmployeeRest.class);<br /><br /> @Autowired<br /> private EmployeeRepository employeeRepository;<br /><br /> @GetMapping("/emps")<br /> public List&lt;Employee&gt; allEmployees()<br /> {<br /> return employeeRepository.findAll();<br /> }<br /><br /> @GetMapping("/emp/{employeeId}")<br /> public Employee findEmployee (@PathVariable Long employeeId)<br /> {<br /> Employee emp = employeeRepository.findOne(employeeId);<br /><br /> return emp;<br /> }<br /><br /> @PostMapping("/emps")<br /> public Employee createEmployee(@RequestBody Employee employee)<br /> {<br /> return employeeRepository.save(employee);<br /> }<br /><br /> @DeleteMapping("/emps/{employeeId}")<br /> public void deleteEmployee(@PathVariable Long employeeId)<br /> {<br /> Employee emp = employeeRepository.findOne(employeeId);<br /> employeeRepository.delete(emp);<br /> logger.info("Employee with id " + employeeId + " deleted...");<br /> }<br /><br />}<br /></pre><br />2. Run the Spring Boot Application which will run on port localhost:8080<br /><br /><br /><span style="color: #3d85c6;">&nbsp; . &nbsp; ____ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;__ _ _</span><br /><span style="color: #3d85c6;">&nbsp;/\\ / ___'_ __ _ _(_)_ __ &nbsp;__ _ \ \ \ \</span><br /><span style="color: #3d85c6;">( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \</span><br /><span style="color: #3d85c6;">&nbsp;\\/ &nbsp;___)| |_)| | | | | || (_| | &nbsp;) ) ) )</span><br /><span style="color: #3d85c6;">&nbsp; ' &nbsp;|____| .__|_| |_|_| |_\__, | / / / /</span><br /><span style="color: #3d85c6;">&nbsp;=========|_|==============|___/=/_/_/_/</span><br /><span style="color: #3d85c6;">&nbsp;:: Spring Boot :: &nbsp; &nbsp; &nbsp; &nbsp;(v1.5.3.RELEASE)</span><br /><span style="color: #3d85c6;"><br /></span><span style="color: #3d85c6;">2017-05-22 13:39:22.910 &nbsp;INFO 8875 --- [ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; main] p.i.b.h.d.HttpieSpringbootApplication &nbsp; &nbsp;: Starting HttpieSpringbootApplication on pas-macbook with PID 8875 (/Users/pasapicella/pivotal/DemoProjects/spring-starter/pivotal/httpie-springboot/target/classes started by pasapicella in /Users/pasapicella/pivotal/DemoProjects/spring-starter/pivotal/httpie-springboot)</span><br /><div><span style="color: #3d85c6;"><br /></span></div><div><span style="color: #3d85c6;">...</span></div><div><span style="color: #3d85c6;"><br /></span></div><div><div><span style="color: #3d85c6;">2017-05-22 13:39:25.948 &nbsp;INFO 8875 --- [ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)</span></div><div><span style="color: #3d85c6;">2017-05-22 13:39:25.952 &nbsp;INFO 8875 --- [ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; main] p.i.b.h.d.HttpieSpringbootApplication &nbsp; &nbsp;: Started HttpieSpringbootApplication in 3.282 seconds (JVM running for 3.676)</span></div></div><div><br /></div>Now we can test HTTPIE and here are some endpoints<br /><br />3. Here are some examples with output<br /><br /><b>** All Employees **</b><br /><br /><span style="color: #3d85c6;">pasapicella@pas-macbook:~$ <b>http http://localhost:8080/api/employee/emps</b></span><br /><span style="color: #3d85c6;">HTTP/1.1 200</span><br /><span style="color: #3d85c6;">Content-Type: application/json;charset=UTF-8</span><br /><span style="color: #3d85c6;">Date: Mon, 22 May 2017 01:26:43 GMT</span><br /><span style="color: #3d85c6;">Transfer-Encoding: chunked</span><br /><span style="color: #3d85c6;"><br /></span><span style="color: #3d85c6;">[</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; {</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "firstName": "pas",</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "id": 1,</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "job": "CEO",</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "lastName": "Apicella"</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; },</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; {</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "firstName": "lucia",</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "id": 2,</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "job": "CIO",</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "lastName": "Apicella"</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; },</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; {</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "firstName": "lucas",</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "id": 3,</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "job": "MANAGER",</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "lastName": "Apicella"</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; },</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; {</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "firstName": "siena",</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "id": 4,</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "job": "CLERK",</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; &nbsp; &nbsp; "lastName": "Apicella"</span><br /><span style="color: #3d85c6;">&nbsp; &nbsp; }</span><br /><span style="color: #3d85c6;">]</span><br /><div><br /></div><div><div><b>** Find Employee by {employeeId} **</b></div><div><br /></div><div><span style="color: #3d85c6;">pasapicella@pas-macbook:~$ <b>http http://localhost:8080/api/employee/emp/1</b></span></div><div><span style="color: #3d85c6;">HTTP/1.1 200</span></div><div><span style="color: #3d85c6;">Content-Type: application/json;charset=UTF-8</span></div><div><span style="color: #3d85c6;">Date: Mon, 22 May 2017 01:31:32 GMT</span></div><div><span style="color: #3d85c6;">Transfer-Encoding: chunked</span></div><div><span style="color: #3d85c6;"><br /></span></div><div><span style="color: #3d85c6;">{</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "firstName": "pas",</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "id": 1,</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "job": "CEO",</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "lastName": "Apicella"</span></div><div><span style="color: #3d85c6;">}</span></div><div><br /></div><div><b>** POST new employee **</b></div><div><br /></div><div><span style="color: #3d85c6;">pasapicella@pas-macbook:~$ <b>http POST http://localhost:8080/api/employee/emps firstName=john lastName=black job=CLERK</b></span></div><div><span style="color: #3d85c6;">HTTP/1.1 200</span></div><div><span style="color: #3d85c6;">Content-Type: application/json;charset=UTF-8</span></div><div><span style="color: #3d85c6;">Date: Mon, 22 May 2017 02:32:34 GMT</span></div><div><span style="color: #3d85c6;">Transfer-Encoding: chunked</span></div><div><span style="color: #3d85c6;"><br /></span></div><div><span style="color: #3d85c6;">{</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "firstName": "john",</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "id": 5,</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "job": "CLERK",</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "lastName": "black"</span></div><div><span style="color: #3d85c6;">}</span></div><div><br /></div><div><b>** POST with updated employee object **</b></div><div><br /></div><div><span style="color: #3d85c6;">pasapicella@pas-macbook:~$ <b>http POST http://localhost:8080/api/employee/emps id:=5 firstName=john lastName=black job=CLEANER</b></span></div><div><span style="color: #3d85c6;">HTTP/1.1 200</span></div><div><span style="color: #3d85c6;">Content-Type: application/json;charset=UTF-8</span></div><div><span style="color: #3d85c6;">Date: Mon, 22 May 2017 02:36:06 GMT</span></div><div><span style="color: #3d85c6;">Transfer-Encoding: chunked</span></div><div><span style="color: #3d85c6;"><br /></span></div><div><span style="color: #3d85c6;">{</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "firstName": "john",</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "id": 5,</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "job": "CLEANER",</span></div><div><span style="color: #3d85c6;">&nbsp; &nbsp; "lastName": "black"</span></div><div><span style="color: #3d85c6;">}</span></div><div><br /></div><div><b>** Delete employee with {employeeId} 5 **</b></div><div><br /></div><div><span style="color: #3d85c6;">pasapicella@pas-macbook:~$ <b>http DELETE http://localhost:8080/api/employee/emps/5</b></span></div><div><span style="color: #3d85c6;">HTTP/1.1 200</span></div><div><span style="color: #3d85c6;">Content-Length: 0</span></div><div><span style="color: #3d85c6;">Date: Mon, 22 May 2017 02:36:56 GMT</span></div></div><br /><div class="blogger-post-footer">http://feeds.feedburner.com/TheBlasFromPas</div><img src="http://feeds.feedburner.com/~r/blogspot/PEqWE/~4/gr7fUyL4drw" height="1" width="1" alt=""/> Pas Apicella tag:blogger.com,1999:blog-6527688743456205256.post-3451498933135502997 Sun May 21 2017 23:58:00 GMT-0400 (EDT) 12cR1 RAC Posts -- 11 : Managing Services in RAC (with PDB) (Video) http://hemantoracledba.blogspot.com/2017/05/12cr1-rac-posts-11-managing-services-in.html <div dir="ltr" style="text-align: left;" trbidi="on">I have uploaded a <a href="https://youtu.be/ffq0LbnyVMw" target="_blank">video on managing services</a> (add, start, check, remove) in a 12c RAC database with a Pluggable Database.<br />.<br />.<br />.<br /><br /><br /></div> Hemant K Chitale tag:blogger.com,1999:blog-1931548025515710472.post-3100146421350382739 Sun May 21 2017 12:01:00 GMT-0400 (EDT) Running Node.js applications from GitHub in generic Docker Container https://technology.amis.nl/2017/05/21/running-node-js-applications-from-github-in-generic-docker-container/ <p>This article shows how I create a generic Docker Container Image to run any Node.JS application based on sources for that application on GitHub. The usage of this image is shown in this picture:</p> <p>&nbsp;</p> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-56.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-55.png?resize=702%2C298&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>Any Node.JS application in any public GitHub repo can be run using this Docker Container Image. When a container is run from this image, the url for the GitHub Repo is passed in as environment variable &#8211; as well as (optionally) the directory in the repo to run the application from, the name of the file to run and the specific version of the Node runtime to use. An example of the command line to use:</p> <p>docker run -e &#8220;GIT_URL=https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&#8221; -e &#8220;APP_PORT=8080&#8221; -p 8005:8080 -e &#8220;APP_HOME=part1&#8221;  -e &#8220;APP_STARTUP=requestCounter.js&#8221;   lucasjellema/node-app-runner</p> <p>This command will run the script requestCounter.js in the part1 directory in the repo found in GitHub at the URL specified. It passes an additional environment variable APP_PORT to the runtime &#8211; to be used in the node application (process.env.APP_PORT). It maps port 8080 inside the container to port 8005 on the host in the standard Docker way.</p> <p>To run an entirely different Node.js application, I can use this command:</p> <p>docker run -e &#8220;GIT_URL=<a href="https://github.com/lucasjellema/nodejs-serversentevents-quickstart&quot;">https://github.com/lucasjellema/nodejs-serversentevents-quickstart&#8221;</a>  -p 8010:8888 -e&#8221;PORT=8888&#8243; -e &#8220;APP_HOME=.&#8221;  -e &#8220;APP_STARTUP=app.js&#8221;   lucasjellema/node-app-runner</p> <p>The same image is started, passing a different GIT_URL and different instructions regarding the directory and the script to run &#8211; and also a different environment variable called PORT.</p> <p>Note: this work is based on the Docker Image created by jakubknejzlik &#8211; see <a title="https://hub.docker.com/r/jakubknejzlik/docker-git-node-app/" href="https://hub.docker.com/r/jakubknejzlik/docker-git-node-app/">https://hub.docker.com/r/jakubknejzlik/docker-git-node-app/</a> and <a title="https://github.com/jakubknejzlik/docker-git-node-app/blob/master/Dockerfile" href="https://github.com/jakubknejzlik/docker-git-node-app/blob/master/Dockerfile">https://github.com/jakubknejzlik/docker-git-node-app/blob/master/Dockerfile</a>.</p> <p>My own sources are part of the GitHub Repository at <a title="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017" href="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017">https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017</a> &#8211; with resources for a workshop on Microservices, Choreography, Docker, Kubernetes, Node.jS, Kafka and more.</p> <p>The steps described in this article:</p> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-57.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-56.png?resize=529%2C334&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>1. Docker file to build the container</p> <p>2. bootstrap.sh file to run when the container is started</p> <p>3. Create image from the container</p> <p>4. Push image to public Docker Hub Registry (<a title="https://hub.docker.com/r/lucasjellema/node-app-runner/" href="https://hub.docker.com/r/lucasjellema/node-app-runner/">https://hub.docker.com/r/lucasjellema/node-app-runner/</a>)</p> <p>(5. Create Node.js application and push to GitHub)</p> <p>6. Run Node.js application from GitHub repository by starting a Docker container from the image created in the previous steps</p> <p>&nbsp;</p> <h3>1. Docker file to build the container</h3> <p>The Docker file is shown here</p> <pre class="brush: plain; title: ; notranslate"> FROM node ENV NODE_VERSION stable ENV NPM_SCRIPT start ENV GIT_URL https://github.com/heroku/node-js-sample ENV APP_PORT 3000 ENV APP_HOME . ENV APP_STARTUP &quot;&quot; # JUST_RUN specifies whether node should be installed and git should be cloned ENV JUST_RUN N COPY ./docker-work /code WORKDIR /code #RUN chown -R app:app /code/* RUN chmod +x /code/bootstrap.sh RUN npm install -g n --silent RUN n stable ENTRYPOINT [&quot;/code/bootstrap.sh&quot;] </pre> <p>It starts from the Docker Image node &#8211; the official base image (see <a title="https://hub.docker.com/_/node/" href="https://hub.docker.com/_/node/">https://hub.docker.com/_/node/</a> for details). The scripts defines a number of environment variables with (default) values; these values can be overwritten when a container is run. The contents of directory <em>docker-work</em> (off the current working directory) is copied into directory /code inside the Docker image. The file bootstrap.sh &#8211; which is in that <em>docker-work</em> directory &#8211; is made executable. NPM package n is installed (<a title="https://www.npmjs.com/package/n" href="https://www.npmjs.com/package/n">https://www.npmjs.com/package/n</a>) for doing version management of Node.js and the currently <em>stable </em>release of Node.js is installed &#8211; in addition to the version of Node.js shipped in the Node Docker image . Finally, the entrypoint is set to bootstrap.sh &#8211; meaning that when a container is started based on the image, this file will be executed.</p> <p>&nbsp;</p> <h3>2. bootstrap.sh file to run when the container is started</h3> <p>The file bootstrap.sh is executed when the container is started. This file takes care of</p> <p>* install a special version of the Node.js runtime if required</p> <p>* cloning the Git repository &#8211; to bring the application sources into the container</p> <p>* installing all required node-modules by running npm install</p> <p>* running the Node.js application</p> <p>The file uses a number of environment variables for these actions:</p> <p>&#8211; NODE_VERSION &#8211; if a specific version of Node runtime is required</p> <p>&#8211; GIT_URL &#8211; the URL to the Git repository that contains the application sources</p> <p>&#8211; APP_HOME &#8211; the directory within the repository that contains package.json and the start script for the application to run</p> <p>&#8211; APP_STARTUP &#8211; the file that should be executed (node $APP_STARTUP); when this parameter is not passed, the application is started with npm start &#8211; based on the start script in package.json</p> <p>&#8211; JUST_RUN &#8211; when this variable has the value Y, then the container will not attempt to install a new version of Node.js nor will it clone the Git repo (again)</p> <pre class="brush: bash; title: ; notranslate"> #!/bin/bash if [ &quot;$JUST_RUN&quot; = &quot;N&quot; ]; then echo switching node to version $NODE_VERSION n $NODE_VERSION --quiet fi echo node version: `node --version` if [ &quot;$JUST_RUN&quot; = &quot;N&quot; ]; then git clone $GIT_URL app fi cd app cd $APP_HOME echo Application Home: $APP_HOME if [ &quot;$JUST_RUN&quot; = &quot;N&quot; ]; then if [ &quot;$YARN_INSTALL&quot; = &quot;1&quot; ]; then yarn install --production --silent else npm install --production --silent fi fi if [ &quot;$APP_STARTUP&quot; = &quot;&quot; ]; then npm run $NPM_SCRIPT else node $APP_STARTUP fi </pre> <p>&nbsp;</p> <h3>3. Build container image</h3> <p>In my environment, I am working on a Windows7 laptop. On this laptop, I have installed Docker Tools. I am running in the Docker Tools Quickstart terminal (fka boot2docker) &#8211; Docker Machine on a Linux client running a small Oracle VirtualBox VM.</p> <p>Using this command I build the container image from the Dockerfile:</p> <blockquote><p>docker build -t lucasjellema/node-app-runner .</p></blockquote> <p><a href="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/SNAGHTMLb25b94a.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="SNAGHTMLb25b94a" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/SNAGHTMLb25b94a_thumb.png?resize=500%2C540&#038;ssl=1" alt="SNAGHTMLb25b94a" border="0" data-recalc-dims="1" /></a></p> <p>To inspect whether the image contains the setup, I can run the image and start a Bash shell &#8211; just check on the contents of the file system:</p> <blockquote><p>docker run  -it &#8211;entrypoint /bin/bash  lucasjellema/node-app-runner</p></blockquote> <p>I can now try out the image, using a command like this:</p> <blockquote><p>docker run -e &#8220;GIT_URL=<a href="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&quot;">https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&#8243;</a> -e &#8220;APP_PORT=8080&#8221; -p 8004:8080 -e &#8220;APP_HOME=part1&#8221;  -e &#8220;APP_STARTUP=requestCounter.js&#8221;   lucasjellema/node-app-runner</p></blockquote> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-58.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-57.png?resize=593%2C126&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>This runs a container, clones the Git repo at the indicated URL to directory /code/app , navigate into directory /code/app/part1, performs an npm install to get required modules and runs requestCounter.js with Node.js, listening at port 8004 for http requests on the host that are forwarded to port 8080 inside the container.</p> <p>In order to access the application on my Windows host, I need to know the IP address of Docker Machine &#8211; the Linux VM instance that runs the Docker server inside VirtualBox. This is done using</p> <blockquote><p>docker-machine ip default</p></blockquote> <p>which will return the IP address assigned to the VM.</p> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-59.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-58.png?resize=244%2C44&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>I can then access the Node.js application at <a href="http://IP_ADDRESS:8004">http://IP_ADDRESS:8004</a>.</p> <p>&nbsp;</p> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-60.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-59.png?resize=244%2C230&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>&nbsp;</p> <p>4. (optional) Push image to public Docker Hub Registry (<a title="https://hub.docker.com/r/lucasjellema/node-app-runner/" href="https://hub.docker.com/r/lucasjellema/node-app-runner/">https://hub.docker.com/r/lucasjellema/node-app-runner/</a>)</p> <p>The image has proven itself, and we can now push it to a public or private registry. To push to Docker Hub:</p> <blockquote><p>docker login</p> <p>docker push lucasjellema/node-app-runner</p></blockquote> <p><a href="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-61.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i2.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-60.png?resize=642%2C118&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>5. Create Node.js application and push to GitHub</p> <p><a href="https://i1.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image-62.png?ssl=1"><img style="background-image: none; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; margin-right: auto; border: 0px;" title="image" src="https://i0.wp.com/technology.amis.nl/wp-content/uploads/2017/05/image_thumb-61.png?resize=702%2C278&#038;ssl=1" alt="image" border="0" data-recalc-dims="1" /></a></p> <p>6. Run Node.js application from GitHub repository by starting a Docker container from the image created in the previous steps</p> <p>I have several Node.js applications that I would like to run &#8211; each in their own container, listening at their own port. This is now very simple and straightforward &#8211; using several calls to docker run, each with different values for GIT_URL, APP_HOME and APP_STARTUP as well as APP_PORT or PORT.</p> <p>For example &#8211; run three containers in parallel:</p> <blockquote><p>docker run -e &#8220;GIT_URL=<a href="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&quot;">https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&#8243;</a> -e &#8220;APP_PORT=8080&#8221; -p 8001:8080 -e &#8220;APP_HOME=part1&#8221;  -e &#8220;APP_STARTUP=requestCounter.js&#8221;   lucasjellema/node-app-runner</p> <p>docker run -e &#8220;GIT_URL=<a href="https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&quot;">https://github.com/lucasjellema/microservices-choreography-kubernetes-workshop-june2017&#8243;</a> -e &#8220;APP_PORT=8080&#8221; -p 8005:8080 -e &#8220;APP_HOME=part1&#8221;  -e &#8220;APP_STARTUP=requestCounter-2.js&#8221;   lucasjellema/node-app-runner</p> <p>docker run -e &#8220;GIT_URL=<a href="https://github.com/lucasjellema/nodejs-serversentevents-quickstart&quot;">https://github.com/lucasjellema/nodejs-serversentevents-quickstart&#8221;</a>  -p 8010:8888 -e&#8221;PORT=8888&#8243; -e &#8220;APP_HOME=.&#8221;  -e &#8220;APP_STARTUP=app.js&#8221;   lucasjellema/node-app-runner</p></blockquote> <p>We can look at the logging from a container:</p> <blockquote><p>docker logs &lt;container id&gt;</p></blockquote> <p>We can stop each container:</p> <blockquote><p>docker stop &lt;container id&gt;</p></blockquote> <p>list all containers &#8211; running and stopped:</p> <blockquote><p>docker container ls -all</p></blockquote> <p>restart a container (now the time to restart is very short):</p> <blockquote><p>docker start &lt;container id&gt;</p></blockquote> <h3>7. Turn Container into Image</h3> <p>Note: it is easy to turn one of these containers running a specific Node.js application itself into an image from which subsequent containers can be run. This image would contain the correct version of Node.js as well as the application and all its dependent modules &#8211; allowing for a faster startup time. The steps:</p> <blockquote><p>docker commit CONTAINER_ID NAME_OF_IMAGE</p></blockquote> <p>for example:</p> <blockquote><p>docker commit a771 request-counter</p></blockquote> <p>Subsequently we can run a container based on this image; note that this time we do not specify the GIT_URL &#8211; because the application and all node_modules are baked into the image. The environment variables used in bootstrap.sh and in the application can still be passed. The startup time for this container should be very short &#8211; since hardly any preparation needs to be performed:</p> <blockquote><p>docker run  -e &#8220;APP_PORT=8080&#8221; -p 8004:8080 -e &#8220;APP_HOME=part1&#8221; -e &#8220;JUST_RUN=Y&#8221; -e &#8220;APP_STARTUP=requestCounter.js&#8221;   request-counter</p></blockquote> <p>&nbsp;</p> <h3>Notes</h3> <p>Note: remove old containers</p> <p>list exited containers:</p> <blockquote><p>docker ps -aq -f status=exited</p></blockquote> <p>remove them (<a href="http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/)">http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/)</a></p> <blockquote><p>docker rm -v $(docker ps -a -q -f status=exited)</p></blockquote> <p>remove dangling images</p> <p>list them:</p> <blockquote><p>docker images -f &#8220;dangling=true&#8221; -q</p></blockquote> <p>Remove them:</p> <blockquote><p>docker rmi $(docker images -f &#8220;dangling=true&#8221; -q)</p></blockquote> <p>The post <a rel="nofollow" href="https://technology.amis.nl/2017/05/21/running-node-js-applications-from-github-in-generic-docker-container/">Running Node.js applications from GitHub in generic Docker Container</a> appeared first on <a rel="nofollow" href="https://technology.amis.nl">AMIS Oracle and Java Blog</a>.</p> Lucas Jellema https://technology.amis.nl/?p=44905 Sun May 21 2017 07:27:16 GMT-0400 (EDT) LEAP#302 Game of Life on the Boldport Club Matrix http://blog.tardate.com/2017/05/leap302-game-of-life-on-the-boldport-club-matrix.html <p>This is a quick and dirty implementation of <a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway’s Game of Life</a> on the <a href="../TheMatrix">Boldport Matrix</a>, mainly to learn a bit more about using the AS1130 LED driver. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/TheMatrix/GameOfLife">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a></p> <iframe class="youtube-embed" src="https://www.youtube.com/embed/xJM7nuiDj8w" frameborder="0" allowfullscreen=""></iframe> <p><a href="https://github.com/tardate/LittleArduinoProjects/tree/master/BoldportClub/TheMatrix/GameOfLife"><img src="http://leap.tardate.com/BoldportClub/TheMatrix/GameOfLife/assets/GameOfLife_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap302-game-of-life-on-the-boldport-club-matrix.html Sun May 21 2017 01:15:38 GMT-0400 (EDT) LEAP#301 DHT11 Sensor Basics http://blog.tardate.com/2017/05/leap301-dht11-sensor-basics.html <p>The DHT11 sensor is a very cheap and common sensor that provides readings of relative humidity (20-80% ±5%) and temperature (0-50°C ±2°C). For a first test, I’m using a simple DHT11 library from the arduino playground. As always, <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/playground/DHT11/Basics">all notes, schematics and code are in the Little Electronics &amp; Arduino Projects repo on GitHub</a> <a href="https://github.com/tardate/LittleArduinoProjects/tree/master/playground/DHT11/Basics"><img src="http://leap.tardate.com/playground/DHT11/Basics/assets/Basics_build.jpg" alt="hero_image" /></a></p> http://blog.tardate.com/2017/05/leap301-dht11-sensor-basics.html Sat May 20 2017 07:05:27 GMT-0400 (EDT) Thoughts on GLOC Conference and ORDS/REST Demos http://www.thatjeffsmith.com/archive/2017/05/thoughts-on-gloc-conference-and-ordsrest-demos/ <p>I had a very, very enjoyable time at the <a href="https://www.neooug.org/gloc/" target="_blank">Great Lakes Oracle Conference</a> this week in Cleveland (OHIO! &#8211; Just in case Joel is reading this.)</p> <p>About 400 people attended, and I think it&#8217;s become one of the best conferences in the US, esp for the bang you get for your buck.</p> <p>I did two talks.</p> <p>For the first one, they had me in the &#8216;big&#8217; room &#8211; right after the day&#8217;s Keynote. The Keynote topic was technical writing and how to use less BS (except he didn&#8217;t say BS).</p> <p>One of the takeaways that stuck for me was on jargon &#8211; and boy do we at Oracle love our jargon. We love our acronyms too. And my REST talk uses a lot of it. So I quickly added a slide on JSON.</p> <p><iframe src="//www.slideshare.net/slideshow/embed_code/key/btnpdcqOIA7gMm?startSlide=9" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> </p> <div style="margin-bottom:5px"> <strong> <a href="//www.slideshare.net/hillbillyToad/auto-rest-enabling-your-oracle-database-tables" title="REST Enabling Your Oracle Database" target="_blank">REST Enabling Your Oracle Database</a> </strong> from <strong><a target="_blank" href="//www.slideshare.net/hillbillyToad">Jeff Smith</a></strong> </div> <p>I also took a bit more time to talk about what REST is, and how that equates to something like a database.</p> <p>One of the things I REALLY appreciated as a speaker was a full hour to present the topic. I need every minute of that for a talk like this. I&#8217;d like to see smaller conferences aim for hour long talks again. It seems we&#8217;re on the slippery slope to 45 minutes, and I feel rushed at that time period.<br /> <div id="attachment_6172" style="width: 752px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/rest1.jpg"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/rest1-1024x1024.jpg" alt="" width="742" height="742" class="size-large wp-image-6172" /></a><p class="wp-caption-text">Ric actually helped me form my talk with some nice discussion earlier that morning &#8211; thanks bud!</p></div> <p>This talk focuses quite a bit on a feature we offer &#8211; the ability to auto publish a REST API for your tables and views. I won&#8217;t say it&#8217;s controversial, but I will say it&#8217;s probably more practical to write custom RESTful Services in the &#8216;real world.&#8217; But if I&#8217;m introducing the concept of REST enabling a database, then this AUTO feature works very nicely to get folks into the game. Thanks again <a href="https://twitter.com/RicVanDyke" target="_blank">Ric</a> for reminding me that I need to make this point more succinctly. </p> <p>I need to rethink this talk so that&#8217;s more obvious, or I need a 90 minute talk vs the 60!</p> <p>I ended the conference with another packed room, and I talked about SQL Developer in all of it&#8217;s incarnations.<div id="attachment_6173" style="width: 752px" class="wp-caption aligncenter"><a href="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/sqldev.jpg"><img src="http://www.thatjeffsmith.com/wp-content/uploads/2017/05/sqldev-1024x1024.jpg" alt="" width="742" height="742" class="size-large wp-image-6173" /></a><p class="wp-caption-text">I secretly turned this into a tips &#038; tricks talk, muwahahahaha.</p></div> <p>I got one of my least favorite questions in this talk &#8211; &#8216;why is your tool better than ________?&#8217; </p> <p>That&#8217;s not my question to answer &#8211; I think it&#8217;s yours to answer. Some folks want a checklist of things we do that &#8216;they&#8217; don&#8217;t. That&#8217;s a really weird game to play, but I get it.</p> <p>My ultimate answer lies in about 500 or so blog posts here, and I guess you could really say I voted with my feet about 6 years ago when I came over to Oracle took this job.</p> <p>I don&#8217;t normally do conference or travel wrap-up posts, but I always enjoy reading <a href="https://oracle-base.com/blog/2017/04/30/oracle-code-prague-the-journey-home/" target="_blank">Tim&#8217;s</a>, so I figured, why not?</p> <p>Happy weekend everybody. It&#8217;s time to go to the neighbors for a cook-out.</p> <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --> thatjeffsmith http://www.thatjeffsmith.com/?p=6171 Fri May 19 2017 18:10:44 GMT-0400 (EDT)