tag:blogger.com,1999:blog-75599441402848872442024-03-14T07:15:53.038+01:00Learning Apex the hard way!Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.comBlogger63125tag:blogger.com,1999:blog-7559944140284887244.post-86780167896314912362018-10-21T18:03:00.001+02:002018-10-25T17:12:30.769+02:00Installing Oracle Apex 18.2 into my container<h2>
Go docker, go... </h2>
I run this installation from inside the docker container. The reason for this decision is, that I always face some issues when updateing the images from a windows system. So I open a bash shell in the container and navigate to the apex directory. You have missed something earlier, if there is no Apex directory in your container.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-iWa80fmggDk/W8yDdmEyjlI/AAAAAAAAJW8/b2iO_NjWLGwCjtt93z2PspMALJzz1hIGACLcBGAs/s1600/apexdir.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="179" data-original-width="770" height="92" src="https://1.bp.blogspot.com/-iWa80fmggDk/W8yDdmEyjlI/AAAAAAAAJW8/b2iO_NjWLGwCjtt93z2PspMALJzz1hIGACLcBGAs/s400/apexdir.png" width="400" /></a></div>
<br />
All installation related information can be found <a href="https://docs.oracle.com/database/apex-18.1/HTMIG/toc.htm" target="_blank">here</a>.<br />
<br />
I want to install apex into a pdb. So I start <b>sqlplus</b>, connect to the dba as <b>sys</b> role <b>sysdba</b> and switch to the pdb.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-zi162ERUEhc/W8yEg-6rUHI/AAAAAAAAJXI/PGWB5N1aQuUhcc2dvyynN2Nc0w2HI24tACLcBGAs/s1600/login.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="295" data-original-width="794" height="147" src="https://3.bp.blogspot.com/-zi162ERUEhc/W8yEg-6rUHI/AAAAAAAAJXI/PGWB5N1aQuUhcc2dvyynN2Nc0w2HI24tACLcBGAs/s400/login.png" width="400" /></a></div>
<br />
I install a development environment and I stick to the documentation, because I don't want to add some additional effort.<br />
<br />
<pre dir="ltr"><i><b>@apexins.sql SYSAUX SYSAUX TEMP /i/</b></i></pre>
<pre dir="ltr"><b> </b></pre>
<div dir="ltr">
This takes a while. Done!!</div>
<div dir="ltr">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-avYQ-3Uq-d0/W8yOP19rO-I/AAAAAAAAJXU/FlMF-h-kKKE6n1NAoRikuU8wSCsmhrvOACLcBGAs/s1600/done.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="578" data-original-width="1126" height="205" src="https://2.bp.blogspot.com/-avYQ-3Uq-d0/W8yOP19rO-I/AAAAAAAAJXU/FlMF-h-kKKE6n1NAoRikuU8wSCsmhrvOACLcBGAs/s400/done.png" width="400" /></a></div>
<div dir="ltr">
<br /></div>
<h2 dir="ltr">
Configuring the Embedded PL/SQL Gateway</h2>
<div dir="ltr">
For now I use the embedded pl/sql gateway, so I run the command</div>
<div dir="ltr">
<br /></div>
<pre dir="ltr"><i><b>@apex_epg_config.sql /opt/oracle</b></i></pre>
<pre dir="ltr"><i><b> </b></i></pre>
<div dir="ltr">
because my apex directory is located in this directory.<i><b> </b></i></div>
<div dir="ltr">
<i><b><br /></b></i></div>
<div dir="ltr">
Pssst... don't forget to unlock the ANONYMOUS schema!<i><b></b></i></div>
<div dir="ltr">
<i><b><br /></b></i></div>
<div dir="ltr">
<i><b>ALTER USER ANONYMOUS ACCOUNT UNLOCK;</b></i></div>
<br />
<h3 class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
Verifying the Port Assigned to HTTP on the Oracle XML DB HTTP Server</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/--TINHf3psRE/W8yYfWfQ7oI/AAAAAAAAJXk/yLqIswWs7GIYpOdekPR4FHrrAHdr0n6EwCLcBGAs/s1600/httpport.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="380" data-original-width="502" height="302" src="https://2.bp.blogspot.com/--TINHf3psRE/W8yYfWfQ7oI/AAAAAAAAJXk/yLqIswWs7GIYpOdekPR4FHrrAHdr0n6EwCLcBGAs/s400/httpport.png" width="400" /></a></div>
<h3 class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
</h3>
<h3 class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
The password....</h3>
<div class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
Okay, maybe we should set a password for the user as well...</div>
<div class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
<br /></div>
<div class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
<i><b>@apxchpwd.sql</b></i></div>
<div class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
<br /></div>
<h3 class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
And than there was this authorization issue...</h3>
<div class="sect2" id="HTMIG-GUID-25F94A9C-24AF-4204-BB99-97037A4B2057">
While connecting to Apey <b>http://<hostname>:8080/apex/apex_admin</hostname></b> (Portforwarding!) I received the following dialog. </div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-p4XSWUwRYlU/W8yh1wrPK4I/AAAAAAAAJX0/FXu5M_oNyngqAQZOOD6-oI_cCF_gOgrzwCEwYBhgL/s1600/xdb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="490" data-original-width="1000" height="195" src="https://1.bp.blogspot.com/-p4XSWUwRYlU/W8yh1wrPK4I/AAAAAAAAJX0/FXu5M_oNyngqAQZOOD6-oI_cCF_gOgrzwCEwYBhgL/s400/xdb.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
OK this time unlocking the ANONYMOUS in the CDB schema solved the issue.</div>
<h3 class="separator" style="clear: both; text-align: left;">
And here we go</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-5SfxEYL_0v8/W8yjO0y3I0I/AAAAAAAAJX8/Ai1b2COOYDc3s8NulL-ETfDkXgJ27ERQgCLcBGAs/s1600/apex.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="388" data-original-width="1565" height="79" src="https://1.bp.blogspot.com/-5SfxEYL_0v8/W8yjO0y3I0I/AAAAAAAAJX8/Ai1b2COOYDc3s8NulL-ETfDkXgJ27ERQgCLcBGAs/s320/apex.png" width="320" /></a></div>
<h3 class="separator" style="clear: both; text-align: left;">
</h3>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-16947085476875331972018-10-10T19:51:00.003+02:002018-10-10T19:51:22.725+02:00Commit your docker container!<h2>
Safe your work </h2>
I would somehow like to persist the actual result of this approach and the easiest way to do this is to create a new image based on my actual container. I will use the <b>docker commit </b>comand to do this.<br />
<br />
I connect to the docker with putty, identify the <b>Container Id </b>by using the command <b>docker ps</b> and create a new image by issuing the command <b>docker commit d8ff275aeb95 martinm/oracle/database:18.3.0-ee</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-Q6nQw8i0y2c/W74qz9mH5II/AAAAAAAAJVc/h_PImwFFPBEReByIopeJvvKcReXLlOFTACLcBGAs/s1600/commit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="279" data-original-width="1289" height="86" src="https://3.bp.blogspot.com/-Q6nQw8i0y2c/W74qz9mH5II/AAAAAAAAJVc/h_PImwFFPBEReByIopeJvvKcReXLlOFTACLcBGAs/s400/commit.png" width="400" /></a></div>
<b><br /></b>
This will stop the docker container for a while, take some time<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-iSaYJBOTyzs/W74oSkfXPgI/AAAAAAAAJVU/N4DoWpN_vBcmn1pxxpco6LMHzR6DCblxgCEwYBhgL/s1600/stopped.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="83" data-original-width="810" height="40" src="https://3.bp.blogspot.com/-iSaYJBOTyzs/W74oSkfXPgI/AAAAAAAAJVU/N4DoWpN_vBcmn1pxxpco6LMHzR6DCblxgCEwYBhgL/s400/stopped.png" width="400" /></a></div>
<br />
and create the image<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-3yJJ4SllcjE/W747m6SrLlI/AAAAAAAAJVo/3bBuPZTDnF46GSsH0ki4HfM8Nl3L_MYkwCLcBGAs/s1600/Image.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="93" data-original-width="803" height="46" src="https://3.bp.blogspot.com/-3yJJ4SllcjE/W747m6SrLlI/AAAAAAAAJVo/3bBuPZTDnF46GSsH0ki4HfM8Nl3L_MYkwCLcBGAs/s400/Image.png" width="400" /></a></div>
<br />
<h3>
Hyperbackup</h3>
Did I already mention, that I also backup my <b>oradata</b> folder?<br />
<b></b>
<b></b>Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-68708733947026952522018-10-08T22:42:00.002+02:002018-10-08T22:42:40.404+02:00DATABASE not so READY TO USE!<h2>
Lesson learned</h2>
<strike>In fact it turned out, that the database
was not READY TO USE. Even if it was stated in the log. The listener
simply refused the connection. So I waited until today and finally I was
able to connect to the db. There was no further action required. Simply
relax and wait. </strike><br />
<br />
In fact this statement is bulls...<br />
<br />
OK the database wasn't ready to use and after a restart of the server I was not even able to connect to the database anymore.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-56e6UwcUrJ8/W7u3VwfePMI/AAAAAAAAJT8/9z04FYVRm2sR-etKakh_AyaM9C65_KKcgCLcBGAs/s1600/listener.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="209" data-original-width="390" height="171" src="https://4.bp.blogspot.com/-56e6UwcUrJ8/W7u3VwfePMI/AAAAAAAAJT8/9z04FYVRm2sR-etKakh_AyaM9C65_KKcgCLcBGAs/s320/listener.png" width="320" /></a></div>
<br />
<br />
<h3>
Und da waren sie wieder, meine x Probleme... </h3>
So 1st of all the listener does not know of any services anymore. Even after waiting some time.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-4wyZtDMeZWw/W7uQlU8IrZI/AAAAAAAAJTk/C8xy06g0EPgg3xuYTZcizMpdvyv1IbYjACLcBGAs/s1600/listener.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="299" data-original-width="880" height="135" src="https://3.bp.blogspot.com/-4wyZtDMeZWw/W7uQlU8IrZI/AAAAAAAAJTk/C8xy06g0EPgg3xuYTZcizMpdvyv1IbYjACLcBGAs/s400/listener.png" width="400" /></a></div>
<br />
After consulting google I found the advise to execute the sql cmd<br />
<br />
<b>alter system register;</b><br />
<br />
But how to connect to the database without a listener? In my last post I was able to execute sqlplus on the docker container, so maybe it is possible from there.<br />
<br />
But unfortunately...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-Q9_JHcx_vVc/W7u35Kll2YI/AAAAAAAAJUE/vkTf-bVsaHoK9KQ0gbnzeIYg6t_kkYu3ACLcBGAs/s1600/ora.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="266" data-original-width="770" height="137" src="https://3.bp.blogspot.com/-Q9_JHcx_vVc/W7u35Kll2YI/AAAAAAAAJUE/vkTf-bVsaHoK9KQ0gbnzeIYg6t_kkYu3ACLcBGAs/s400/ora.png" width="400" /></a></div>
<br />
<b></b>
After consulting google again...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-Wn-ApCXRjAk/W7uSwq8sNYI/AAAAAAAAJTw/BBWC2HVq638l_7XCeOs9GkxwtXdxcykhQCLcBGAs/s1600/oracle_sid.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="164" data-original-width="617" height="106" src="https://3.bp.blogspot.com/-Wn-ApCXRjAk/W7uSwq8sNYI/AAAAAAAAJTw/BBWC2HVq638l_7XCeOs9GkxwtXdxcykhQCLcBGAs/s400/oracle_sid.png" width="400" /></a></div>
So I stop the container, add an the environment variable <b>ORACLE_SID</b> and restart the container.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-SHOgh1IjIGQ/W7u4ScFBIwI/AAAAAAAAJUQ/haQl6cv2K8Y1Mbd0-tQ-01BUpNXWl_wNACLcBGAs/s1600/oracls_sid.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="544" data-original-width="636" height="341" src="https://1.bp.blogspot.com/-SHOgh1IjIGQ/W7u4ScFBIwI/AAAAAAAAJUQ/haQl6cv2K8Y1Mbd0-tQ-01BUpNXWl_wNACLcBGAs/s400/oracls_sid.png" width="400" /></a></div>
<br />
<br />
OK, now I'm able to connect to the database and run the cmd.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-boFgHoPDxIE/W7u4wrTmOSI/AAAAAAAAJUc/QgSSHInkm2QmlJd2swjWa_bGHJZoB1T-ACLcBGAs/s1600/sqlplus.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="357" data-original-width="844" height="167" src="https://2.bp.blogspot.com/-boFgHoPDxIE/W7u4wrTmOSI/AAAAAAAAJUc/QgSSHInkm2QmlJd2swjWa_bGHJZoB1T-ACLcBGAs/s400/sqlplus.png" width="400" /></a></div>
<br />
<br />
But still no effect.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-negcxDuwp2o/W7u5DvnDbNI/AAAAAAAAJUk/3SnnayLn2xs-_tzqbckxsHYlH_O9f7bZwCLcBGAs/s1600/lsnrctl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="460" data-original-width="955" height="192" src="https://2.bp.blogspot.com/-negcxDuwp2o/W7u5DvnDbNI/AAAAAAAAJUk/3SnnayLn2xs-_tzqbckxsHYlH_O9f7bZwCLcBGAs/s400/lsnrctl.png" width="400" /></a></div>
<br />
<br />
After consulting google again... it looks like there is an issue with 0.0.0.0. So we need a host name. Does the container have a host name? Well not yet. But we can create a container with a host name.<br />
<br />
So we delete the existing container. Change the permissions of the <b>tnanames.ora </b>and <b>listener.ora</b> in the /docker/oradata/dbconfig/ORCLCDB folder and update the files with the host name that will be used for the container <b>my.oracle18db.net</b>.<br />
<h3>
<listener .="" aria-haspopup="true" class="goog-spellcheck-word" id=":dg.19" role="menuitem" span="" style="background: yellow none repeat scroll 0% 0%;" tabindex="-1">ora</listener></h3>
> LISTENER = <br />(DESCRIPTION_LIST = <br /> (DESCRIPTION = <br /> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) <br /> (ADDRESS = (PROTOCOL = TCP)(HOST = my.oracle18db.net)(PORT = 1521)) <br /> ) <br />) <br /><br />DEDICATED_THROUGH_BROKER_LISTENER=ON<br />DIAG_ADR_ENABLED = off<br /><br />
<h3>
<tnsnames.ora></h3>
LISTENER_ORCLCDB=<br /> (ADDRESS = (PROTOCOL = TCP)(HOST = my.oracle18db.net)(PORT = 1521))<br /><br />ORCLCDB= <br />(DESCRIPTION = <br /> (ADDRESS = (PROTOCOL = TCP)(HOST = my.oracle18db.net)(PORT = 1521))<br /> (CONNECT_DATA =<br /> (SERVER = DEDICATED)<br /> (SERVICE_NAME = ORCLCDB)<br /> )<br />)<br />
<br />
Now I create a new container with the command:<br />
<br />
<b>docker run --name oracle-18c-database --hostname my.oracle18db.net -v /volume4/docker/apex:/opt/oracle/apex:rw -v /volume4/docker/oradata:/opt/oracle/oradata:rw -p 31521:1521/tcp -p 35500:5500/tcp -p 38080:8080/tcp oracle/database:18.3.0-ee</b><br />
<br />
adding<b> </b>a host name. Of course I have establish the ORACLE_SID environment variable again.<br />
<br />
And after restarting the container.<br />
<h3>
Tadaaa its magic</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-DDGk9aV6lB4/W7u_fqJppTI/AAAAAAAAJUw/A72kaqhC75cDoEHZZ2Sp6NPAE4Ms339qQCLcBGAs/s1600/listener.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="622" data-original-width="995" height="250" src="https://1.bp.blogspot.com/-DDGk9aV6lB4/W7u_fqJppTI/AAAAAAAAJUw/A72kaqhC75cDoEHZZ2Sp6NPAE4Ms339qQCLcBGAs/s400/listener.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Also the SQL Developer works again</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-YwKJj9MM69U/W7u_y2aSM9I/AAAAAAAAJU4/rHcgI4Lnvis9qereunwWYHuDHZvgqVkkQCEwYBhgL/s1600/connected.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="128" data-original-width="289" height="177" src="https://3.bp.blogspot.com/-YwKJj9MM69U/W7u_y2aSM9I/AAAAAAAAJU4/rHcgI4Lnvis9qereunwWYHuDHZvgqVkkQCEwYBhgL/s400/connected.png" width="400" /></a></div>
<h3 class="separator" style="clear: both; text-align: left;">
A brief summary</h3>
<ul>
<li>add the environment variable ORACLE_SID to the container</li>
<li>add a host name to the container</li>
<li> update listener.ora and tnsnames.ora</li>
</ul>
And now to something completely different! Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-65487848578887573582018-10-08T19:21:00.000+02:002018-10-08T19:21:14.420+02:00Running sqlplus on the docker container<h2>
Running sqlplus on the docker container</h2>
I faced some issues while trying to install APEX from windows. Especially loading images was not possible. So I decided to use the sqlplus client in my docker container.<br />
<br />
<h3>
Secure access to the APEX installation files</h3>
Do you remember the volume we have mounted during the 1st execution of the container?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-PN63AfcAB7w/W7ob6hK_nVI/AAAAAAAAJSY/eXiJIojwExEH-GZMqNZUg1acnkuGCmIcQCLcBGAs/s1600/mountpoint.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="67" data-original-width="518" height="51" src="https://3.bp.blogspot.com/-PN63AfcAB7w/W7ob6hK_nVI/AAAAAAAAJSY/eXiJIojwExEH-GZMqNZUg1acnkuGCmIcQCLcBGAs/s400/mountpoint.png" width="400" /></a></div>
<br />
I unzip the Apex installation files into the docker/apex folder on my synology. Access secured.<br />
<h3>
Connect as root</h3>
To be able to run sqlplus on the docker container it is required, that we access the synology using SSH most likely as user root.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-2rqWZ7YUVMw/W7oc_ON0iNI/AAAAAAAAJSk/RerAK0iW21YtsiFPqPbjtG8xvVXsdJPVQCLcBGAs/s1600/root.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="153" data-original-width="413" height="118" src="https://4.bp.blogspot.com/-2rqWZ7YUVMw/W7oc_ON0iNI/AAAAAAAAJSk/RerAK0iW21YtsiFPqPbjtG8xvVXsdJPVQCLcBGAs/s320/root.png" width="320" /></a></div>
<h3>
Bash shell in the docker container</h3>
To open a bash shell inside the docker container, we first run the command <b>docker ps</b> to identify the name of our oracle image. There should not be any surprise, but just in case :)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-T4QJaRVkFJw/W7oenzHmx0I/AAAAAAAAJSw/aCqyQBILzZwHt7DpymBSqPokzbya8YVJACLcBGAs/s1600/dps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="134" data-original-width="665" height="64" src="https://1.bp.blogspot.com/-T4QJaRVkFJw/W7oenzHmx0I/AAAAAAAAJSw/aCqyQBILzZwHt7DpymBSqPokzbya8YVJACLcBGAs/s320/dps.png" width="320" /></a></div>
<br />
Then we execute a bash shell inside the container by running <b> <br /> </b><br />
<b>docker exec -it oracle-18c-database /bin/bash</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-ebDyvF7ToMk/W7ofpA3urtI/AAAAAAAAJS4/cs3zSKmpI9ApeH5n-e_VWchddlKngSkcQCLcBGAs/s1600/bash.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="54" data-original-width="760" height="22" src="https://4.bp.blogspot.com/-ebDyvF7ToMk/W7ofpA3urtI/AAAAAAAAJS4/cs3zSKmpI9ApeH5n-e_VWchddlKngSkcQCLcBGAs/s320/bash.png" width="320" /></a></div>
That's it!<br />
<h3>
Running sqlplus</h3>
To continue with the APEX installation we navigate to the installation directory of the APEX installation files (<b>cd /opt/oracle/apex</b>). And execute sqlplus in nolog mode (<b>sqlplus /nolog)</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-xDaEE6NI7x8/W7ogwTFygjI/AAAAAAAAJTM/Ew10t_dG5_04lWOTW11w6zaaTH3bVS4qwCLcBGAs/s1600/sqlplus.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="193" data-original-width="759" height="81" src="https://3.bp.blogspot.com/-xDaEE6NI7x8/W7ogwTFygjI/AAAAAAAAJTM/Ew10t_dG5_04lWOTW11w6zaaTH3bVS4qwCLcBGAs/s320/sqlplus.png" width="320" /></a></div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com1tag:blogger.com,1999:blog-7559944140284887244.post-91202240052345843852018-10-07T12:33:00.003+02:002018-10-08T22:43:57.596+02:00Connectivity!<h2>
Fritz Box</h2>
I't is required to configure static port forwarding rules in your router to enable the communication between the internet and your container. In my setup I have mapped the ports 38080, 31521 and 35500 to sligtly different ports lets say x8080, x1521 and x5500. These ports can be reached via the DynDNS address of my NAS<br />
<h3>
TNS_ADMIN</h3>
The lazy developer utilizes the tnsnames.ora file.<br />
<h4>
Environment variable</h4>
If not already available create an environment variable with the name <b>TNS_ADMIN</b> pointing at the path of your tnsnames.ora file.<br />
<h4>
tnsnames.ora</h4>
Add the following entries to your existing tnsnames.ora file or create a new one in the prefered location.<br />
<br />
ORCLCDB =<br />
(DESCRIPTION = <br />
(ADDRESS_LIST =<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = <b>xxx.xxxxxxx.xxx</b>)(PORT = <b>X</b>1521))<br />
)<br />
(CONNECT_DATA =<br />
(SERVICE_NAME = ORCLCDB)<br />
)<br />
)<br />
<br />
ORCLPDB1 =<br />
(DESCRIPTION = <br />
(ADDRESS_LIST =<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = <b>xxx.xxxxxxx.xxx</b>)(PORT = <b>X</b>1521))<br />
)<br />
(CONNECT_DATA =<br />
(SERVICE_NAME = ORCLPDB1)<br />
)<br />
) <br />
<br />
Please adapt the host and port to your DynDNS address and external port.<br />
<h3>
SQL Developer</h3>
The actual SQL Developer version at point of writing is 18.2.<br />
With an tnsnames.ora in place it is easy to establish connections to the container and plugable database.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-09yQkeCBi8E/W7nZ9RG1MiI/AAAAAAAAJR0/a3GTUcTT8bsu_lRMJMmIMTehWz1hwbMXgCLcBGAs/s1600/connections.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="753" height="215" src="https://2.bp.blogspot.com/-09yQkeCBi8E/W7nZ9RG1MiI/AAAAAAAAJR0/a3GTUcTT8bsu_lRMJMmIMTehWz1hwbMXgCLcBGAs/s400/connections.png" width="400" /></a></div>
<br />
Connecting the sys schema as SYSDBA allows me to apply DBA related tasks to the database(s).<br />
<br />
<h3>
Oracle Enterprise Manager</h3>
I can call the enterprise manager under the following link:<br />
<br />
<b>https://<dyndns .name="">:<x>5500/em</x></dyndns></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
I want to connect to the container db <b>ORCLCDB </b>as sysdba first. Please not that the Container name to be used has to be <b>CDB$ROOT.</b> While trying to login into the CDB you will most likely face this dialog:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-KO2NPs5TUYg/W7nTpuQi0XI/AAAAAAAAJRs/mPjz_sXx_ecbG50q_QfIwNMNEFGfYVD3QCEwYBhgL/s1600/xdb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="414" data-original-width="679" height="243" src="https://1.bp.blogspot.com/-KO2NPs5TUYg/W7nTpuQi0XI/AAAAAAAAJRs/mPjz_sXx_ecbG50q_QfIwNMNEFGfYVD3QCEwYBhgL/s400/xdb.png" width="400" /></a></div>
<br />
Finally I came across an <a href="https://www.martinberger.com/?p=4131" target="_blank">explanation </a>of the issue and even better the solution. We simply have to enable the related global port by executing the command:<br />
<br />
<b>exec dbms_xdb_config.setglobalportenabled(TRUE);</b><br />
<br />
as user SYS as SYSDBA on the database ORCLCDB. I had to reload my FireFox to be able to connect to the EM.<br />
It is required to enable the global port separately for every plugable db that needs to be accessed with the EM. In case of the ORCLPDB1, this means run the command as user SYS<b> </b>as SYDBA on the database ORCLPDB1. In case of plugable databases the container name in the EM is equal to the database name. Finally you will see this wonderful dashboard.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-QZKyHrHjqAM/W7ndHZ4pBFI/AAAAAAAAJSA/t0ugJmKVLsMsLW3i9EO4jcbb8z18uUMMwCLcBGAs/s1600/em.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="745" data-original-width="1600" height="185" src="https://1.bp.blogspot.com/-QZKyHrHjqAM/W7ndHZ4pBFI/AAAAAAAAJSA/t0ugJmKVLsMsLW3i9EO4jcbb8z18uUMMwCLcBGAs/s400/em.png" width="400" /></a></div>
<br />
<h3>
sqlplus</h3>
Finally I would like to connect to my database(s) using sqlplus. I downloaded the oracle instant client 18.2 from <a href="https://www.oracle.com/technetwork/topics/winx64soft-089540.html" target="_blank">OTN.</a> It is required to fetch the basic and the sqlplus package. I have unpacked both packages and added the location to my %PATH%.<br />
I start sqlplus by using the windows powershell and the command<br />
<br />
<b>sqlplus /nolog</b><br />
<br />
and login into the plugable database with the command<br />
<br />
<b>conn sys@orclpdb1 as sysdba</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-5T0pHD8bFu8/W7nimhhFsQI/AAAAAAAAJSM/ObjbWNgAK4IbbvWeBWpwjVGRZqa0HaJ0ACLcBGAs/s1600/sqlplus.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="243" data-original-width="627" height="124" src="https://4.bp.blogspot.com/-5T0pHD8bFu8/W7nimhhFsQI/AAAAAAAAJSM/ObjbWNgAK4IbbvWeBWpwjVGRZqa0HaJ0ACLcBGAs/s320/sqlplus.png" width="320" /></a></div>
<br />
<br />
Please ignore the warning => SP2-0310: unable to open file "LOGIN.SQL"<b> </b>Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-87736982813282280202018-10-06T19:51:00.002+02:002018-10-06T19:53:14.062+02:00DATABASE IS READY TO USE!<h2>
Finally</h2>
After 2.5h finally the log stated<br />
<br />
<pre class="allowDefCtxMenu selectabletext">#########################</pre>
<pre class="allowDefCtxMenu selectabletext">DATABASE IS READY TO USE!</pre>
<pre class="allowDefCtxMenu selectabletext">######################### </pre>
<br />
According to the log a conatiner database <b>ORCLCDB</b> and the first plugable database<b> ORCLPDB1</b><br />
have been created.<br />
<br />
As creating an Oracle RDBMS container takes some time it might be usefull to export the container.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-cOyCPvumgns/W7j1IxotWrI/AAAAAAAAJRI/zD72dA0jPtYUFF3zF6Zl1ivR73JpL5z7gCLcBGAs/s1600/export.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="296" data-original-width="1051" height="112" src="https://2.bp.blogspot.com/-cOyCPvumgns/W7j1IxotWrI/AAAAAAAAJRI/zD72dA0jPtYUFF3zF6Zl1ivR73JpL5z7gCLcBGAs/s400/export.png" width="400" /></a></div>
<br />
And to be on the save side I prefer to export the container and its content to my Diskstation.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-35Il7OgObR8/W7j1mnArr3I/AAAAAAAAJRQ/CjvyFpFdoWI2hZ0IAPRg7qhXdDOycWhYACLcBGAs/s1600/export1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="440" data-original-width="534" height="263" src="https://4.bp.blogspot.com/-35Il7OgObR8/W7j1mnArr3I/AAAAAAAAJRQ/CjvyFpFdoWI2hZ0IAPRg7qhXdDOycWhYACLcBGAs/s320/export1.png" width="320" /></a></div>
<br />
In addition I create a Hyperbackup of my oradata files to have a backup of my database.Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-30329818144451865222018-10-06T13:48:00.004+02:002018-10-06T20:15:24.635+02:00Launching the container for the 1st time<h2>
Container preparation</h2>
I know, that it is possible to use the command line, but in this case I prefer the wizard to create and launch the container. To start I go to the images section, highlight the <b>oracle/database:18.3.0-ee</b> image and press the launch button.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-5mqElzN5FqY/W7iU0tPJOYI/AAAAAAAAJPk/FTEIpML0APoJTdayQEzlplcIlgI91_0gACLcBGAs/s1600/Image.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="561" data-original-width="1055" height="211" src="https://4.bp.blogspot.com/-5mqElzN5FqY/W7iU0tPJOYI/AAAAAAAAJPk/FTEIpML0APoJTdayQEzlplcIlgI91_0gACLcBGAs/s400/Image.png" width="400" /></a></div>
<h3>
General Settings</h3>
Always choose a meaningful container name. I will use <b>oracle-18c-database</b>, as I will not have multiple databases in place at the same point in time. Then I click on the advanced settings button.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-g3hyseTKH3Q/W7iV1ol6R1I/AAAAAAAAJPs/rR65yYCfoosckxeu_mSbYAGHe1KL9xfgQCLcBGAs/s1600/container1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="494" data-original-width="687" height="287" src="https://1.bp.blogspot.com/-g3hyseTKH3Q/W7iV1ol6R1I/AAAAAAAAJPs/rR65yYCfoosckxeu_mSbYAGHe1KL9xfgQCLcBGAs/s400/container1.png" width="400" /></a></div>
<br />
I will not limit the resources of my synology unless it is absolutely required. It is possible to run the container with the default settings, but I would like to make some adjustments.<br />
<h3>
Advanced settings</h3>
Not very advanced, but I would like enable the <b>auto-restart</b>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-o39OhEbDaBk/W7iX6gAi7_I/AAAAAAAAJP4/BezVhx78Fq8dT-phvl8PbZVHY34_spbLQCLcBGAs/s1600/advancedSettings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="198" data-original-width="630" height="100" src="https://2.bp.blogspot.com/-o39OhEbDaBk/W7iX6gAi7_I/AAAAAAAAJP4/BezVhx78Fq8dT-phvl8PbZVHY34_spbLQCLcBGAs/s320/advancedSettings.png" width="320" /></a></div>
<br />
<h3>
Volume</h3>
Mounting volumes simply enables us to use directories placed outside the container inside the container. This makes it easier to add additional functionality to the container. I mount two volumes.<br />
Both source directories are located in my docker home.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-MW0gIUxrcqc/W7iaIoaZuiI/AAAAAAAAJQE/wV0YAIwxLYEGiP7Uh1CasubenmhSSOXIACLcBGAs/s1600/volumes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="164" data-original-width="671" height="78" src="https://2.bp.blogspot.com/-MW0gIUxrcqc/W7iaIoaZuiI/AAAAAAAAJQE/wV0YAIwxLYEGiP7Uh1CasubenmhSSOXIACLcBGAs/s320/volumes.png" width="320" /></a></div>
<br />
The directory <b>oradata</b> will contain the database files and the directory <b>apex</b> contains the latest Oracle Apex version 18.2 that will be installed in a later step.<br />
<h3>
Port settings</h3>
I like static port mappings so here we go. Using static port mappings will secure that all my port forwarding's are still valid after a restart of the container.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-Su9frFs6nKg/W7ibBLQkATI/AAAAAAAAJQM/zLbDmZKCkBkVWDMudDBCe89s7uAwolpKACLcBGAs/s1600/ports.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="202" data-original-width="700" height="92" src="https://4.bp.blogspot.com/-Su9frFs6nKg/W7ibBLQkATI/AAAAAAAAJQM/zLbDmZKCkBkVWDMudDBCe89s7uAwolpKACLcBGAs/s320/ports.png" width="320" /></a></div>
<br />
Pressing apply returns us to the <b>General Settings </b>screen. Everything is in place so we can hit the Next button.<br />
<h3>
Summary</h3>
The summary page highlights all details of the future container. The flag to run the container immediately after the wizard is finished is set already. I hit apply as everything looks fine.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-A4CFYckI1C4/W7ic3TQjP0I/AAAAAAAAJQY/gLFPwTbJiD8DxZSVT4nc0CcxOMXpP_p_QCLcBGAs/s1600/summary.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="493" data-original-width="690" height="228" src="https://3.bp.blogspot.com/-A4CFYckI1C4/W7ic3TQjP0I/AAAAAAAAJQY/gLFPwTbJiD8DxZSVT4nc0CcxOMXpP_p_QCLcBGAs/s320/summary.png" width="320" /></a></div>
<br />
Starting the container will take some time, because at this point in time the databases will be created and you will not see much progress. However you can switch to the containers page to monitor the progress.<br />
<h3>
Container</h3>
This is the place to see all available containers and there status (high level).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-rtjn2rlbpzE/W7idwmD77XI/AAAAAAAAJQg/9DrIfQfFHh0V1rQs7kMdIZUB--xeohaxgCLcBGAs/s1600/container.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="294" data-original-width="1048" height="89" src="https://3.bp.blogspot.com/-rtjn2rlbpzE/W7idwmD77XI/AAAAAAAAJQg/9DrIfQfFHh0V1rQs7kMdIZUB--xeohaxgCLcBGAs/s320/container.png" width="320" /></a></div>
To get more details I highlight the container and hit the Details button.<br />
<h3>
Overview </h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-Nmc9SRWC5Js/W7ieJxqSFkI/AAAAAAAAJQo/i7ZYRk12HWcVFCJ2c7Qerve3YtPYyF7sgCLcBGAs/s1600/details.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="552" data-original-width="1407" height="156" src="https://2.bp.blogspot.com/-Nmc9SRWC5Js/W7ieJxqSFkI/AAAAAAAAJQo/i7ZYRk12HWcVFCJ2c7Qerve3YtPYyF7sgCLcBGAs/s400/details.png" width="400" /></a></div>
Did I mention that creating a database will take a hell of time? If you start to get worried you can check two tabs of the container details page.<br />
<h3>
Log</h3>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-vbYZTjdvb6Y/W7ie-k3wXvI/AAAAAAAAJQ0/mxWUZjOS0-Afk0p5Dt5WAgORNpITGtfdACLcBGAs/s1600/log.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="555" data-original-width="1406" height="157" src="https://1.bp.blogspot.com/-vbYZTjdvb6Y/W7ie-k3wXvI/AAAAAAAAJQ0/mxWUZjOS0-Afk0p5Dt5WAgORNpITGtfdACLcBGAs/s400/log.png" width="400" /></a></div>
<br />
The log tab will show you the actual log of your container and therefor the progress of the installation. However, sometimes it takes some time as well until the progress in shown in the log (NO PANIC!). It also shows you the initial password set for your DBA schema's. The log will remain at least for some days. In fact I have not seen any log entries disappearing.<br />
<h3>
Process</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-epMf9ts2fSY/W7igAtkGesI/AAAAAAAAJQ8/_81F4dH_L18evDHTosmCu36W09K-ZjGKACLcBGAs/s1600/process.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="555" data-original-width="1407" height="157" src="https://2.bp.blogspot.com/-epMf9ts2fSY/W7igAtkGesI/AAAAAAAAJQ8/_81F4dH_L18evDHTosmCu36W09K-ZjGKACLcBGAs/s400/process.png" width="400" /></a></div>
<br />
The process tab shows the actual processes running in your container. So everything is fine as long as figures are changing here, even if there is no progress in the log (NO PANIC!).<br />
<h3>
Terminal</h3>
Okay, there is a terminal tab. But I don't use it. You can give it a try and you will find out, why I prefer to use putty instead.<br />
<br />
<h3>
The run command</h3>
In case you still want to use the cmd or in case you don't use this on a synology.<br />
<br />
docker run --name oracle-18c-database -v /volume4/docker/apex:/opt/oracle/apex:rw -v /volume4/docker/oradata:/opt/oracle/oradata:rw -p 31521:1521/tcp -p 35500:5500/tcp -p 38080:8080/tcp oracle/database:18.3.0-ee Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-34113270944675094902018-10-03T11:49:00.004+02:002018-10-03T11:49:41.501+02:00Oracle 18c Docker Image (on Synology 918+)<h2>
Connect to your synology using ssh</h2>
To build the image we have to connect to the synology via ssh. Root privileges would help. Latest at this point you need to enable the SSH service on your synology.<br />
<br />
I use putty to connect to my synolgy via SSH. Credentials are simply the user name and password of my admin account. To obtain root privileges I use the command:<br />
<br />
<b>sudo -i</b><br />
<br />
and key in the admins password again. Done.<br />
<b> </b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-04eGeUB69FE/W7D28h6kUGI/AAAAAAAAJNM/TjQW8x_3nhwoJoTHym_goJVfLwdbQOdIQCLcBGAs/s1600/root.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="305" data-original-width="739" height="165" src="https://4.bp.blogspot.com/-04eGeUB69FE/W7D28h6kUGI/AAAAAAAAJNM/TjQW8x_3nhwoJoTHym_goJVfLwdbQOdIQCLcBGAs/s400/root.png" width="400" /></a></div>
<h2>
Build the image</h2>
The script <b>buildDockerImage.sh </b>to create a single instance database image is located in the<br />
folder (docker root on volume 4 on my synology):<br />
<br />
<b>/volume4/docker/docker-images-master/OracleDatabase/SingleInstance/dockerfiles</b><br />
<br />
Moving to this folder makes life a lot easier.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-jxNCI2R8nww/W7D4td3Uh-I/AAAAAAAAJNY/rulPKDqJuTIfnbXygQ0JVluha9urpx9NQCLcBGAs/s1600/jump.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="91" data-original-width="1184" height="48" src="https://1.bp.blogspot.com/-jxNCI2R8nww/W7D4td3Uh-I/AAAAAAAAJNY/rulPKDqJuTIfnbXygQ0JVluha9urpx9NQCLcBGAs/s640/jump.png" width="640" /></a></div>
<b> </b><br />
<br />
Usage of the buildDockerImage.sh is explained in the <a href="https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md" target="_blank">readme</a>. For now I would like to create an Oracle 18.3 enterprise edition image, so here we go:<br />
<br />
<b> ./buildDockerImage.sh -v 18.3.0 -e</b><br />
<br />
TROUBLE: <b> </b>I don't like this kind of messages:<br />
<br />
<b>Docker version is below the minimum required version 17.09<br />Please upgrade your Docker installation to proceed.</b><br />
<br />
So upgrading docker does not seem to be an option. For now I grep an <a href="https://github.com/oracle/docker-images/tree/b20993f1521c2d9d06acac0e8f67a50cfc3a8dad" target="_blank">earlier </a>version of the build scripts. Maybe this is not the best possible solution, but it works.<br />
<br />
SOME SMALLER OBSTACLES: Ok very small<br />
<br />
<b>-ash: ./buildDockerImage.sh: Permission denied</b><br />
<br />
Nothing that couldn't be changed with a <b>chmod +x buildDockerImage.sh</b><br />
<br />
After some time (NOTE: The build process will download all other required images, so there might be some activity in your docker lately) the build will be ready to use.<br />
<br />
<b> </b><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-ad_Na6_8FT0/W7EUqIfXDkI/AAAAAAAAJNk/XSf1hw9ztiEoiB-MFdnLLWq0hX3jClwVACLcBGAs/s1600/build.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="206" data-original-width="931" height="141" src="https://3.bp.blogspot.com/-ad_Na6_8FT0/W7EUqIfXDkI/AAAAAAAAJNk/XSf1hw9ztiEoiB-MFdnLLWq0hX3jClwVACLcBGAs/s640/build.png" width="640" /></a></div>
<b> </b><br />
<br />
It takes some more time if additional downloads are required!<br />
<br />Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-33881737244684694752018-10-03T11:48:00.001+02:002018-10-03T11:48:10.589+02:00Getting prepared to create an Oracle 18c Docker Image on my Synology 918+<h2>
I'll try to keep it short...</h2>
Before you can start you have to install the docker package on your synology (It works on my 918+, but I would strongly recommend some RAM).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-uM9OgWIr2Ac/W7CpLxJoG3I/AAAAAAAAJMk/zN6BqG9xEFoXvzYe4_LVB3bKbbeshIpMgCLcBGAs/s1600/Docker.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="110" data-original-width="271" src="https://1.bp.blogspot.com/-uM9OgWIr2Ac/W7CpLxJoG3I/AAAAAAAAJMk/zN6BqG9xEFoXvzYe4_LVB3bKbbeshIpMgCLcBGAs/s1600/Docker.png" /></a></div>
<h2>
Starting from scratch...</h2>
I want to use the newest oracle 18c database for my development/learning environment and i couldn't find any non commercial docker image. I don't want to use the commercial images, because in my understanding I will have to pay a license fee at some point in time.<br />
<br />
So lets create a docker image from scratch. Well not 100% from scratch, because there is a <a href="https://github.com/oracle/docker-images/" target="_blank">git repo</a> out there to support us. First of all we need to grep the build files(<b>docker-images-master.zip</b>) from the repo (Simply press the green button and download the Zip). Additionally we need the oracle installation binaries from <a href="https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html" target="_blank">OTN</a>. Downloading of course requires a free OTN account.<br />
<br />
So lets pick the Linux X86-64<b>(LINUX.X64_180000_db_home.zip</b>) version.<br />
<br />
<h2>
<b>Preparing the synology...</b></h2>
Please activate the ssh service on your synology to enable external access(Control Panel / Terminal & SNMP) if not already done.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-JN0VTzmyqRM/W7Dtn40LghI/AAAAAAAAJM0/Ei1sik9s4I4Jr9uVlhFH1IWXtGTaDcQ6QCLcBGAs/s1600/ssh_service.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="174" data-original-width="404" height="137" src="https://2.bp.blogspot.com/-JN0VTzmyqRM/W7Dtn40LghI/AAAAAAAAJM0/Ei1sik9s4I4Jr9uVlhFH1IWXtGTaDcQ6QCLcBGAs/s320/ssh_service.png" width="320" /></a></div>
<b> </b><br />
<br />
<b></b>
To utilize the predefined script <b>buildDockerImage.sh</b> we need a compatible folder structure accessible on the synology and to store the oracle installation binary inside the correct sub folder.<br />
<br />
Lets keep it easy, I extract the docker-images-master.zip into the docker root(/volume4/docker) on my synology and copy the file LINUX.X64_180000_db_home.zip into the sub folder<br />
<br />
<b>/volume4/docker/docker-images-master/OracleDatabase/SingleInstance/dockerfiles/18.3.0</b><br />
<br />
I use WinSCP as admin to transfer the files from windows<b> </b>to the synology. In my case the docker root is located on volume 4.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-jLhyAvlkr1Q/W7DxEhbrXuI/AAAAAAAAJNA/hn0jHL4QMaEzg3MxStg1ewKQFwW4Q3GTgCLcBGAs/s1600/files.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="475" data-original-width="711" height="213" src="https://4.bp.blogspot.com/-jLhyAvlkr1Q/W7DxEhbrXuI/AAAAAAAAJNA/hn0jHL4QMaEzg3MxStg1ewKQFwW4Q3GTgCLcBGAs/s320/files.png" width="320" /></a></div>
<br />Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-27280077970757778512018-09-30T12:39:00.000+02:002018-10-03T11:45:33.358+02:00A brandnew infrastructure<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
The underlying Idea</h2>
<div style="text-align: left;">
It has been a while since I last posted and I have changed my development Infrastructure a lot since. I started a new approach and after some failures I thought it might be a good idea to write a new blog in regards to my dev/learning environment. <br />
Instead of running a development environment including APEX and an oracle database on my various laptops, I decided to create some kind of a server that can be accessed from nearly everywhere. In addition I would like to utilize oracles 18th editions.</div>
<h2 style="text-align: left;">
Target environment</h2>
<ul style="text-align: left;">
<li>my new NAS Synology 918+ (OK, I pimped the RAM to <a href="https://idomix.de/synology-diskstation-ds918-ram-upgrade-8-12-16-gb" target="_blank">16GB</a> (thanks Dominik))</li>
<li>Docker (I have to learn a lot)</li>
<li>Oracle 18c on Oracle Linux</li>
<li>APEX 18.2 (Brand new on the 28 September 2018. In fact I failed with)</li>
<li>Accessible through my Fritz Box 7490</li>
</ul>
<b>Not</b> being a server manager, docker expert and a DBA, this will be a learning experience for me as well. Supporting hints are welcome at any time.</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-66507521165282630092016-02-03T09:32:00.002+01:002016-02-03T14:59:39.559+01:00The next page using the wizard<div dir="ltr" style="text-align: left;" trbidi="on">
Okay, lets create the form using the page wizard.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-1NiigXiJzME/VrG1ewVYPrI/AAAAAAAAG8Q/iTqhPM6vO6k/s1600/2016-02-03%2B09_07_59-Application%2BBuilder.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="185" src="http://3.bp.blogspot.com/-1NiigXiJzME/VrG1ewVYPrI/AAAAAAAAG8Q/iTqhPM6vO6k/s320/2016-02-03%2B09_07_59-Application%2BBuilder.jpg" width="320" /></a></div>
Of course, we use the <b>Form </b>wizard,<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-2N7tqDn2Udw/VrG1vBu2klI/AAAAAAAAG8Y/v8jYcJXj2Lc/s1600/2016-02-03%2B09_09_10-Application%2BBuilder.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="164" src="http://2.bp.blogspot.com/-2N7tqDn2Udw/VrG1vBu2klI/AAAAAAAAG8Y/v8jYcJXj2Lc/s320/2016-02-03%2B09_09_10-Application%2BBuilder.jpg" width="320" /></a></div>
and especially the <b>Tabular Form </b>wizard to create a single region.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-GSPWx0J_7Mw/VrG34zpuwEI/AAAAAAAAG8o/sTx8xWJ0DOI/s1600/2016-02-03%2B09_16_14-Application%2BBuilder.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="http://1.bp.blogspot.com/-GSPWx0J_7Mw/VrG34zpuwEI/AAAAAAAAG8o/sTx8xWJ0DOI/s320/2016-02-03%2B09_16_14-Application%2BBuilder.jpg" width="320" /></a></div>
Our form is based on the view <b>maintenance_db.plsql_profiler_runs_vw</b> and we want to be able to update and delete records. We use the column <b>runid </b>as primary key, and keep the existing trigger to handle updates and deletes (No additional functionality inside the page). Also we decide, that it shall be only be possible to update the column <b>RUN_COMMENT.</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-2lqUY_ZMDFI/VrG5aSlXwFI/AAAAAAAAG80/1QTbcb7clDY/s1600/2016-02-03%2B09_24_46-Application%2BBuilder.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="http://4.bp.blogspot.com/-2lqUY_ZMDFI/VrG5aSlXwFI/AAAAAAAAG80/1QTbcb7clDY/s320/2016-02-03%2B09_24_46-Application%2BBuilder.jpg" width="320" /></a></div>
<b><br /></b>
Please refer to the screenshot for the other seetings. And of course do not associate the page with the Navigation Menu.<br />
<br />
And the result looks like:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-H_dMnFESj-w/VrG6oi1IlAI/AAAAAAAAG9A/NsMmuXFugTg/s1600/2016-02-03%2B09_29_44-PLSQL%2BProfiler%2BRun%2BDetails.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="101" src="http://2.bp.blogspot.com/-H_dMnFESj-w/VrG6oi1IlAI/AAAAAAAAG9A/NsMmuXFugTg/s320/2016-02-03%2B09_29_44-PLSQL%2BProfiler%2BRun%2BDetails.jpg" width="320" /></a></div>
<br />
<br />
Like the Profiler runs page. That is not exactly, what I wanted,but maybe I can add the <b>Percent Graph </b>column here and remove the other page. Please notice, that this page already has all the functionality, that we had to create manually in APEX 4.1.<br />
<br />
On the other side we will loose the nice functionality connected to the interactive report.</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-1802551224881886412016-02-03T08:53:00.002+01:002016-02-08T16:18:38.068+01:00Ever tried to delete a page?<div dir="ltr" style="text-align: left;" trbidi="on">
Deleting pages in APEX 5 sucks. But finally I found at least one way to do it!<br />
<br />
<br />
<ul style="text-align: left;">
<li>Switch to <b>Utilities/Cross Page Utilities/Delete Multiple Pages</b></li>
<li>Mark the page you want to delete and press <b>Delete Pages</b></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Mk16uYt3o74/VrGzP-RI7cI/AAAAAAAAG8E/VPTyTmxEjmE/s1600/2016-02-03%2B08_58_06-Delete%2BMultiple%2BPages.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="https://3.bp.blogspot.com/-Mk16uYt3o74/VrGzP-RI7cI/AAAAAAAAG8E/VPTyTmxEjmE/s640/2016-02-03%2B08_58_06-Delete%2BMultiple%2BPages.jpg" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
That's it</div>
<br />
<br />
I would appreciate any hints to do it faster.<br />
<br />
Thanks <a href="https://www.blogger.com/profile/01674531537929187560" target="_blank">David</a>, I must have been blind!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-bdMJ4X_gNPI/VrixhA2ZtbI/AAAAAAAAHB0/EpyslajFjO4/s1600/2016-02-08%2B16_13_43-Page%2BDesigner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-bdMJ4X_gNPI/VrixhA2ZtbI/AAAAAAAAHB0/EpyslajFjO4/s1600/2016-02-08%2B16_13_43-Page%2BDesigner.jpg" /></a></div>
<br /></div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com1tag:blogger.com,1999:blog-7559944140284887244.post-17947337294743721542016-02-03T08:45:00.001+01:002016-02-03T09:03:04.878+01:00The next page... 2.0<div dir="ltr" style="text-align: left;" trbidi="on">
I added the next (empty) page <b style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2px;">PLSQL Profiler Run Details</b><span style="background-color: #fefdfa; color: #333333; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18.2px;">.</span><b style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2px;"> </b><span style="background-color: #fefdfa; color: #333333; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18.2px;">The page will not show up in the <b>Navigation Menu</b>, but as a child of the page <b>Profiler Runs </b>(renamed) in the Breadcrumbs list.</span><br />
<span style="background-color: #fefdfa; color: #333333; font-family: "arial" , "tahoma" , "helvetica" , "freesans" , sans-serif; font-size: 13px; line-height: 18.2px;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-htPYl4wE9yE/VrGv4UhAsVI/AAAAAAAAG74/dFQM0NxsaLY/s1600/2016-02-03%2B08_35_26-PLSQL%2BProfiler%2BRun%2BDetails.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="117" src="http://1.bp.blogspot.com/-htPYl4wE9yE/VrGv4UhAsVI/AAAAAAAAG74/dFQM0NxsaLY/s320/2016-02-03%2B08_35_26-PLSQL%2BProfiler%2BRun%2BDetails.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
On second thought, it might be better to use the <b>page wizard</b> this time!</div>
</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-10620148589958353872016-02-03T07:45:00.000+01:002016-02-03T08:45:27.665+01:00Did I mention ...?<div dir="ltr" style="text-align: left;" trbidi="on">
I really love the <b>Quick Edit</b> button, that opens the Page designer at the perfect spot for changes.<br />
<br />
So, when I want to f.e. edit the graph Attribute, I simply:<br />
<br />
<ul style="text-align: left;">
<li>klick on the <b>Quicke Edit</b> button</li>
<li>hover over the header of the <b>Graph</b> column until a blue square surronds it and klick on it</li>
</ul>
<div>
After that the <b>Page Designer </b>will open and the <b>Graph </b>column section of my Interactive Report is selected.</div>
</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-88554161803179233752016-02-03T07:39:00.001+01:002016-02-03T07:39:17.521+01:00PLSQL Profiler Runs => Adding a Gauge 2.0<div dir="ltr" style="text-align: left;" trbidi="on">
Based on what I described in<br />
<br />
<a href="http://learningapexthehardway.blogspot.in/2011/11/plsql-profiler-runs-adding-gauge.html" target="_blank">PLSQL Profiler Runs => Adding a Gauge</a><br />
<br />
I changed the query of the interactive report region to<br />
<br />
SELECT runid ,<br />
related_run ,<br />
run_owner ,<br />
run_date ,<br />
run_comment ,<br />
run_total_time ,<br />
run_comment1,<br />
ROUND((run_total_time * 100) / max_run_total_time, 0) AS graph<br />
FROM<br />
(SELECT r.runid ,<br />
r.related_run ,<br />
r.run_owner ,<br />
TO_TIMESTAMP(TO_CHAR(r.run_date, 'DD.MM.YYYY HH24:MI:SS'), 'DD.MM.YYYY HH24:MI:SS') AS run_date ,<br />
r.run_comment ,<br />
r.run_total_time ,<br />
r.run_comment1,<br />
(SELECT MAX(run_total_time) FROM plsql_profiler_runs_vw<br />
) AS max_run_total_time<br />
FROM plsql_profiler_runs_vw r<br />
);<br />
<br />
Please notice, that we not have to create some fancy HTML code to display the percentage gauge,<br />
<br />
With Apex 5 we only have to set the type of the Graph Attribute to <b>Percent Graph</b> and we are done.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-KrvyxPJj9Dg/VrGfq8sGK4I/AAAAAAAAG7U/yA8sA4iRWbQ/s1600/2016-02-03%2B07_33_49-Page%2BDesigner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-KrvyxPJj9Dg/VrGfq8sGK4I/AAAAAAAAG7U/yA8sA4iRWbQ/s400/2016-02-03%2B07_33_49-Page%2BDesigner.jpg" /></a></div>
<br />
The result looks impressive, doesn't it?<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-e4d1bHZh1_4/VrGgd8e0j6I/AAAAAAAAG7g/xKoODsw2Obc/s1600/2016-02-03%2B07_38_07-Profiler.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="110" src="http://3.bp.blogspot.com/-e4d1bHZh1_4/VrGgd8e0j6I/AAAAAAAAG7g/xKoODsw2Obc/s400/2016-02-03%2B07_38_07-Profiler.jpg" width="400" /></a></div>
</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-15090298128772994812016-02-03T07:20:00.000+01:002016-02-03T07:20:53.490+01:00PLSQL Profiler Runs 2.0<div dir="ltr" style="text-align: left;" trbidi="on">
By now our lonely page looks pretty much empty, so we will add some content by adding and <b>Interactive Report</b> region to the page (Simple drag it in the <b>Content Body </b>section).<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-xPZbq5PUrPY/VrGWRVnk4zI/AAAAAAAAG6c/MkrRcLjmdSM/s1600/2016-02-03%2B06_54_15-Page%2BDesigner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="http://1.bp.blogspot.com/-xPZbq5PUrPY/VrGWRVnk4zI/AAAAAAAAG6c/MkrRcLjmdSM/s320/2016-02-03%2B06_54_15-Page%2BDesigner.jpg" width="320" /></a></div>
<br />
For now it is red, showing that there is an error.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-3lt4IjNS1to/VrGXoFCIM2I/AAAAAAAAG6o/4qUTtp1OSLc/s1600/2016-02-03%2B06_58_33-Page%2BDesigner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="http://4.bp.blogspot.com/-3lt4IjNS1to/VrGXoFCIM2I/AAAAAAAAG6o/4qUTtp1OSLc/s320/2016-02-03%2B06_58_33-Page%2BDesigner.jpg" width="320" /></a></div>
<br />
Don't worry, we have just not defined the query to feed the report yet. I use this slightly ajusted query from an old post to solve this issue.<br />
<br />
SELECT r.runid ,<br />
r.related_run ,<br />
r.run_owner ,<br />
TO_TIMESTAMP(TO_CHAR(r.run_date, 'DD.MM.YYYY HH24:MI:SS'), 'DD.MM.YYYY HH24:MI:SS') AS run_date ,<br />
r.run_comment ,<br />
r.run_total_time ,<br />
r.run_comment1<br />
FROM plsql_profiler_runs_vw r;<br />
<br />
And the result looks imediatly like this:<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-4LAUvWdCKgM/VrGZX-3lwhI/AAAAAAAAG60/Z_MI5ktcMCM/s1600/2016-02-03%2B07_07_46-Profiler.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="162" src="http://4.bp.blogspot.com/-4LAUvWdCKgM/VrGZX-3lwhI/AAAAAAAAG60/Z_MI5ktcMCM/s400/2016-02-03%2B07_07_46-Profiler.jpg" width="400" /></a></div>
<br />
<br />
Hmm, looks like I was a little sloppy on adjusting the Timestamp formats. After some adjustments in Shared Components/Edit Globalization Attributes/Globalization the outcome should be like this:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-PPiA525xdBQ/VrGbOej-djI/AAAAAAAAG7A/e2shX8ef2Yw/s1600/2016-02-03%2B07_12_32-Profiler.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="165" src="http://3.bp.blogspot.com/-PPiA525xdBQ/VrGbOej-djI/AAAAAAAAG7A/e2shX8ef2Yw/s400/2016-02-03%2B07_12_32-Profiler.jpg" width="400" /></a></div>
<br />
<br /></div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-295317242394465562016-02-03T06:26:00.002+01:002016-02-03T06:26:26.594+01:00Ever wanted to change the name of a page and show it in the Navigation menu as well?<div dir="ltr" style="text-align: left;" trbidi="on">
I started with a page <b>HOME</b> as in Apex 4.1, but then I decided that I wanted to use the nice Navigation menu on the left hand side, skip the <b>HOME</b> page and start with the <b>PROFILER</b> page instead.<br />
<br />
First approach => Update the name and the Title attribute in the page designer from<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-KVu7t5IP_BI/VrF9qvnaE1I/AAAAAAAAG5o/qM4oZWQn45Y/s1600/2016-02-03%2B05_09_45-Page%2BDesigner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-KVu7t5IP_BI/VrF9qvnaE1I/AAAAAAAAG5o/qM4oZWQn45Y/s400/2016-02-03%2B05_09_45-Page%2BDesigner.jpg" /></a></div>
<br />
<br />
to<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-cey4qbXg6Vc/VrF-B55Id-I/AAAAAAAAG5w/qG-GIahfbgk/s1600/2016-02-03%2B05_11_33-Page%2BDesigner.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-cey4qbXg6Vc/VrF-B55Id-I/AAAAAAAAG5w/qG-GIahfbgk/s400/2016-02-03%2B05_11_33-Page%2BDesigner.jpg" /></a></div>
<br />
Result:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-kfl-6AEWW_c/VrF-hsO4w4I/AAAAAAAAG54/izXRAfD5KUY/s1600/2016-02-03%2B05_13_30-Profiler.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="http://2.bp.blogspot.com/-kfl-6AEWW_c/VrF-hsO4w4I/AAAAAAAAG54/izXRAfD5KUY/s320/2016-02-03%2B05_13_30-Profiler.jpg" width="320" /></a></div>
<br />
<br />
Naaaa, thats not what I expected.<br />
<br />
So in fact we have to change some settings in the applications <b>Shared Components </b>section to change the <b>Navigation Menu</b> and the <b>Breadcrumbs</b>.<br />
<br />
So for the Navigation Menu:<br />
<br />
<ul style="text-align: left;">
<li>open the <b>Shared Components </b>page</li>
<li>find the <b>Navigation</b> section</li>
<li>pick the <b>Navigation Menu</b> link</li>
<li>pick the <b>Desktop Navigation Menu </b>list</li>
<li>open the entry named <b>Home</b></li>
<li>finally change the <b>List Entry label</b> on the <b>Entry</b> tab to whatever you want in this case to <b>"Profiler"</b></li>
</ul>
<div>
For the Breadcrumb:</div>
<div>
<ul>
<li>open the <b>Shared Components </b>page</li>
<li>find the <b>Navigation</b> section</li>
<li>pick the <b>Breadcrumbs</b> link</li>
<li>pick the <b>Breadcrumb </b>entry from the <b>Breadcrumbs</b> list</li>
<li>open the entry named <b>Home</b></li>
<li>finally also change the <b>Short Name</b> to whatever you want in this case to <b>"Profiler"</b></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-B6xs97FCol0/VrGPOD2fPDI/AAAAAAAAG6M/2XFvxptT6Dk/s1600/2016-02-03%2B06_24_22-Profiler.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="199" src="http://3.bp.blogspot.com/-B6xs97FCol0/VrGPOD2fPDI/AAAAAAAAG6M/2XFvxptT6Dk/s320/2016-02-03%2B06_24_22-Profiler.jpg" width="320" /></a></div>
<div>
<b><br /></b></div>
</div>
<div>
<br /></div>
<br />
<b>Done!</b><br />
<br />
<br />
<br /></div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-25662207662687459862016-02-02T10:26:00.000+01:002016-02-03T06:47:20.705+01:00Getting started ... 2.0<div dir="ltr" style="text-align: left;" trbidi="on">
Well, I have been here before, but this time it is Apex 5. So in our nice new workspace we create a nice new application. In fact a desktop application.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-TV_Mu5iMrTo/VrB0CM-76VI/AAAAAAAAG4U/2jSWHMNu8gA/s1600/2016-02-02%2B10_16_25-Create%2BApplication.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="155" src="http://2.bp.blogspot.com/-TV_Mu5iMrTo/VrB0CM-76VI/AAAAAAAAG4U/2jSWHMNu8gA/s320/2016-02-02%2B10_16_25-Create%2BApplication.png" width="320" /></a></div>
<br />
<span style="background-color: #fefdfa; color: #333333; font-family: "helvetica" , "arial" , sans-serif; font-size: 14px; line-height: 19.6px;">I name the application (again) </span><b style="background-color: #fefdfa; color: #333333; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19.6px;">maintenance dashboard</b><span style="background-color: #fefdfa; color: #333333; font-family: "helvetica" , "arial" , sans-serif; font-size: 14px; line-height: 19.6px;">, because I (still) don't want to limit it to profiler handling only.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-nx8Z7LvROF8/VrB06zswN5I/AAAAAAAAG4g/n3O7-BPIZJc/s1600/2016-02-02%2B10_20_16-Create%2BApplication.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="257" src="http://2.bp.blogspot.com/-nx8Z7LvROF8/VrB06zswN5I/AAAAAAAAG4g/n3O7-BPIZJc/s640/2016-02-02%2B10_20_16-Create%2BApplication.jpg" width="640" /></a></div>
For now I keep the Theme, because I have no idea how it looks.<br />
<br />
And I start with a single empty page by now.</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-25585001203751550142016-02-02T09:45:00.000+01:002016-02-02T09:45:11.961+01:00At first there has to be a workspace!<div dir="ltr" style="text-align: left;" trbidi="on">
For our nice new application we first want to create a new workspace.<br />
<br />
So I create a workspace MAINTENANCE in the existing schema MAINTENANCE and use my existin Admin user to manage it.<br />
<br />
DONE</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-81556354757466840812016-02-02T09:26:00.001+01:002016-02-02T09:29:52.520+01:00Import vs. Recreation<div dir="ltr" style="text-align: left;" trbidi="on">
Shall I try to import the old files (quick wins) or shall I start from scratch to have a look on the new features in APEX 5?<br />
<br />
Well, I decided to do a little bit of both!<br />
<br />
When it comes to the database objects, I decided to follow my own advise and reuse all of the database objects as described here:<br />
<br />
<a href="http://learningapexthehardway.blogspot.in/p/final-version.html">Maintenance Dashboard, the final Version</a><br />
<br />
Not including the "Add shared components" and following section(s).<br />
<br />
Saying and doing that I discovered some errors in my original scripts and tried to resolve those,<br />
Please give me a hint if I missed something.<br />
<br />
For the APEX part, I will start from scratch.</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-15342585396719391562016-01-31T13:48:00.001+01:002016-02-02T08:56:30.778+01:00Cisco Anyconnect and the APEX Admin Sign In aka 127.0.0.1:7777/Apex<div dir="ltr" style="text-align: left;" trbidi="on">
Ever tried to use CISCO AnyConnect and APEX the same time? Have fun!<br />
<div>
<br /></div>
<div>
To make it short. If you cannot start APEX with an open VPN connection and the database is located on your own desk-/laptop, add a line to your <b>hosts</b> file in the format:</div>
<div>
<br /></div>
<div>
<b>127.0.0.1 </b><b>name expected by listener</b></div>
<div>
<br /></div>
<div>
How to know, what the listener expects? Run:</div>
<div>
<br /></div>
<div>
<b>lsnrctl status</b></div>
<div>
<b><br /></b></div>
<div>
That will show all of your listners</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-3170601892369682022016-01-31T13:40:00.002+01:002016-01-31T13:48:48.668+01:00Moving on to Apex 5Ok, it has been a while, and I didn't really had the time to drive this any further. But now, I want to take it to the next generation (12c / APEX 5.0.3.00.03).<br />
<br />
Somehow I managed to install Oracle 12c and the newest APEX release on my Laptop.<br />
Being on a business trip I thought this might be the right time to move my old sources to the latest version of APEX, remove some ballast and learn something new.<br />
<br />Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com2tag:blogger.com,1999:blog-7559944140284887244.post-13587412297088857572012-01-22T14:53:00.000+01:002012-01-29T14:27:15.942+01:00Maintenance Dashboard. Toggle the Save Button...Ok even if the Button Label says <b>Apply Changes</b>, the button is named Save inside. So I will use the name Save, or even better <b>P4_SAVE_BUTTON</b> to be crystal clear.<br />
<br />
First I disable the button during Page rendering by changing its template to <b>Button Disabled</b>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-xS4MXZNEENM/TxwFb228CtI/AAAAAAAACGs/anis4IVmDEw/s1600/ScreenShot+108+PLSQL+Profiler+Run+Details+-+Mozilla+Firefox.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="72" src="http://1.bp.blogspot.com/-xS4MXZNEENM/TxwFb228CtI/AAAAAAAACGs/anis4IVmDEw/s320/ScreenShot+108+PLSQL+Profiler+Run+Details+-+Mozilla+Firefox.jpg" width="320" /></a></div>
<br />
My initial plan was to enable/disable the button when the comment item changes. Unfortnatly the change will be only recognized when I leave the item. So I decided to enable the button whenever the comment item gets the focus.<br />
<br />
To be able to enable the button I have to give assign an Id. In this case <b>P4_SAVE_BUTTON</b>. The only thing left to do is to define a <b>dynamic action</b> without condition on the <b>Get Focus</b> event of the <b>P4_RUN_COMMENT</b> item and a true action with this code:<br />
<br />
<code>enableElement('#P4_SAVE_BUTTON');</code><br />
<br />
Thats all!<br />
<br />
For now I'm done with this application, so you will find the final version <a href="http://learningapexthehardway.blogspot.com/p/final-version.html" target="_blank">here</a>. If you have any ideas to improve this application (new functionality or coding), please let me know.Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-23715873021904823182012-01-20T19:10:00.000+01:002012-01-20T19:10:14.452+01:00Maintenance Dashboard. Crimson 23 StyleI hate to push pixels!!<br />
<br />
After some more testing I finally got the solution. And guess what. I had to change some templates again. So I added some more lines in my <b>Crimson_23.css</b> file.<br />
<br />
<b>myButton</b> was changed to <b>display:inline;</b> and to have a <b>margin-right: 4px;</b><br />
<b><br /></b><br />
and I added a section<br />
<br />
<pre><code>.uButtonContainer{
vertical-align: middle;
}</code></pre>
<br />
to vertically allign the button in the surrounding span. And the result looks quite Ok :)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-CiWZRIdY4Pw/Txmpj-f5NeI/AAAAAAAACGQ/DXchuXyDXYU/s1600/ScreenShot+107+Profiler+Runs+-+Mozilla+Firefox.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="70" src="http://4.bp.blogspot.com/-CiWZRIdY4Pw/Txmpj-f5NeI/AAAAAAAACGQ/DXchuXyDXYU/s320/ScreenShot+107+Profiler+Runs+-+Mozilla+Firefox.jpg" width="320" /></a></div>
<br />
Source => <a href="https://docs.google.com/open?id=0B69M4MdK5dDIZjNkMTFjZGQtNmVmNS00ZTU1LTk3YmMtYWRkM2QyNjQ1ZDQ1">MaintenanceDashboard</a>, <a href="https://docs.google.com/open?id=0B69M4MdK5dDIYjZmMjFiNmYtZDNlNC00YzRkLWJkZmItMDkyYWNiNmQ3NGFj">Crimson_23Css</a><br />
<br />
Next step is to disable the <b>Apply Changes</b> button.<br />
<br />
To be continued...Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0tag:blogger.com,1999:blog-7559944140284887244.post-4005042747146151622012-01-20T17:30:00.000+01:002012-01-20T17:30:00.091+01:00Maintenance Dashboard. Implement the new button template...Now I want to get rid of the hidden <b>Delete Button</b> and use the <b>Disabled Button</b> instead.<br />
<br />
I know there are complains about security an disabled buttons, but in this case I only use it for more usability. I think that it is a kind of strange to have a GUI containing checkboxes without having a button or something else to trigger some action. On the other side it is kind of strange to have an enabled button without something to process. So here we go...<br />
<br />
Having my <b>ThemeAdmin</b> application in place it should be easy to implement the new buttons.<br />
<br />
First I duplicate the B<b>utton</b> template. I name the new template <b>Button Disabled</b> as in my last example.<br />
Then I subscribe the two templates to the Reference Master Template with the same name and Theme (Crimson 23) from my <b>ThemeAdmin</b> application.<br />
<br />
I use the page template <b>One Level Tabs - No Sidebar</b> within my application, so I have to subscribe to this template in the <b>ThemeAdmin</b> application as well. Unfortunatly I was lazy and have not applied the necessary changes to this template by now. So I update the template in the <b>ThemeAdmin</b> application. I only have to add this two lines of code to the header section:<br />
<br />
<pre><link rel="stylesheet" href="#WORKSPACE_IMAGES#Crimson_23.css" type="text/css">
<script src="#IMAGE_PREFIX#themes/theme_23/js/4_1.js"></script></pre>
<br />
and publish the template.<br />
<br />
And now a first test and...! Sh..., hit by reality again. Looks like the buttons are not in the wanted position :( another <b>Crimson - 23</b> issue again.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-dIgSiuDqdPI/TxljXraXnDI/AAAAAAAACGA/cqjXnVLaelU/s1600/ScreenShot+105+Profiler+Runs+-+Mozilla+Firefox.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="70" src="http://3.bp.blogspot.com/-dIgSiuDqdPI/TxljXraXnDI/AAAAAAAACGA/cqjXnVLaelU/s320/ScreenShot+105+Profiler+Runs+-+Mozilla+Firefox.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
I will sort that out later.<br />
<br />
For now I switch back to theme <b>Scarlet - 21</b> and everything looks fine (After updating the page template).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-yPtMgdGvNKM/TxlkTUMxslI/AAAAAAAACGI/kJYCo8LsUpc/s1600/ScreenShot+106+Profiler+Runs+-+Mozilla+Firefox.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="70" src="http://1.bp.blogspot.com/-yPtMgdGvNKM/TxlkTUMxslI/AAAAAAAACGI/kJYCo8LsUpc/s320/ScreenShot+106+Profiler+Runs+-+Mozilla+Firefox.jpg" width="320" /></a></div>
<br />
By now I only change the behaviour of the <b>Delete</b> button on page 3. To do so I only have to change the template to <b>Button Disabled</b>, remove the jQuery code that hides the button from the page load section and change the code of the <b>Checkbox Checked</b> dynamic action.<br />
<br />
Source => <a href="https://docs.google.com/open?id=0B69M4MdK5dDIZjg5NDY5YWEtNzczNS00Yzg1LWFkYWQtZjk2YzdiYjNjMDZl">ThemeAdmin</a>, <a href="https://docs.google.com/open?id=0B69M4MdK5dDIYjEyMmU5YzUtMjhkZi00ZWE1LWFjMWItOWUzYjlkNWY5N2Rk">maintenanceDashboard</a>, <a href="https://docs.google.com/open?id=0B69M4MdK5dDIOTc1Y2Y0MTgtZjM1NC00YjhjLThiNzAtMTE4NGQyNzFkN2Rm">Scarlet21Theme</a>, <a href="https://docs.google.com/open?id=0B69M4MdK5dDIOTc1Y2Y0MTgtZjM1NC00YjhjLThiNzAtMTE4NGQyNzFkN2Rm">CustomJs</a><br />
<br />
To be continued....Martin M.http://www.blogger.com/profile/10688464840407646038noreply@blogger.com0