tag:blogger.com,1999:blog-34588894899057712692024-02-27T00:05:49.841-08:00Arnes Tech StuffA Blog on everything IT related, that crosses my way. Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-3458889489905771269.post-86365992689101918842024-02-27T00:05:00.000-08:002024-02-27T00:05:15.774-08:00Oracle on Windows: create 19.21 Gold Image and use it for out-of-place patching<p>This guide shows a way, how a Gold Image can be created from an Oracle Home on Windows and how that can be used to patch other Oracle Homes. This worked for me, but is not meant to be the only, best or officially recommended Oracle way.</p><p><b>Prepare the image source home</b></p>
<p>Start with a fresh installed Oracle Home, in this case under <i>D:\app\oracle\product\19.0.0\dbhome_1\</i>.</p>
<p>There is no standard oraenv.sh under Windows, a minimal oraenv.cmd could look like that:</p>
<!--HTML generated using hilite.me-->
<div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;">set ORACLE_BASE=C:\app\oracle
set ORACLE_HOME=%ORACLE_BASE%\product\19.0.0\dbhome_1
set PATH=%ORACLE_HOME%\bin;%PATH%
set PATH=%ORACLE_HOME%\perl\bin;%PATH%
set PATH=%ORACLE_HOME%\OPatch\;%PATH%
</pre></div>
<p>Run your oraenv.cmd, unpack the software (you can use tar xfz under Windows for unzip) and run setup.bat, see the <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/ntdbi/index.html#Oracle%C2%AE-Database" target="_blank">Database Installation Guide 19c for Microsoft Windows</a>. </p>
<p></p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">C:\app>mkdir c:\app\oracle\product\19.0.0\dbhome_1
C:\app>oraenv.cmd
C:\app>cd %ORACLE_HOME%
C:\app\oracle\product\19.0.0\dbhome_2>tar xfz z:\Install\Windows\WINDOWS.X64_193000_db_home.zip
C:\app\oracle\product\19.0.0\dbhome_2>setup.bat
</pre>
</div>
<p></p>
<p>In this example, we use an existing user oracle instead of a virtual account, which would be the default from the oracle installer. This makes directory handling easier for out-of-place-patching. Also we only need to setup the software only and this is a single instance installation. Under Linux, we would just apply the RU and one-offs from the setup, but the options '<i>-applyRU</i> 'and '<i>-applyOneOffs'</i> are not available under Windows (see the comments on <a href="https://mikedietrichde.com/2022/05/17/simple-database-installation-with-applyru-and-applyoneoffs/">https://mikedietrichde.com/2022/05/17/simple-database-installation-with-applyru-and-applyoneoffs/</a>, search for Windows).
</p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbA6RcbQzc9zGHP0_JeOknoO18GNWO_xmka96regVEJ96V2rEYYEwcPCk0n7DW8w27U4zsaOQthP9YxssLg3wTqGLj6HrZg-XpXN8nbKk4cv-U_H-HKyZrlpJWWd595eX8IZBGr9V-lNSD2UCKE7k1hQAgTXQj6wHpEoiHtK8u3-HbS7OCepfJyqgx/s783/2024-02-21%2012_25_14-Windows10%20Clone%20(Software%20&%20Patches%20ausgepackt,%20oracle%20auf%20EN_DE)%20%5BRunning%5D%20-%20Or.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="588" data-original-width="783" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbA6RcbQzc9zGHP0_JeOknoO18GNWO_xmka96regVEJ96V2rEYYEwcPCk0n7DW8w27U4zsaOQthP9YxssLg3wTqGLj6HrZg-XpXN8nbKk4cv-U_H-HKyZrlpJWWd595eX8IZBGr9V-lNSD2UCKE7k1hQAgTXQj6wHpEoiHtK8u3-HbS7OCepfJyqgx/s320/2024-02-21%2012_25_14-Windows10%20Clone%20(Software%20&%20Patches%20ausgepackt,%20oracle%20auf%20EN_DE)%20%5BRunning%5D%20-%20Or.png" width="320" /></a>
</div>
<p>Update opatch by following <a href="https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=3bip6l7iv_4&_afrLoop=41356978280033" target="_blank">Doc ID 274526.1</a> from Oracle Support, in this case using opatch 12.2.0.1.41.</p><p>For the Gold Image, we will patch the 19.03 dbhome_1 up to 19.21 plus two one-off patches for the JVM. So download and unpack the patches to a given directory, in this example <i>c:\app\oracle\patches</i>. The patch numbers are 35638318, 35648110 and 35681552, these have to be applied manually by running opatch apply in every patch directory, starting with 35681552 which is the Bundle Patch 19.21.</p><p>Now the dbhome_1 is on 19.21 with two additional one-off patches and will serve as source for our Gold Image.</p><p><b>Create the Gold Image</b></p><p>Next, from the patched Oracle Home, we create a Gold Image following the <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/ntdbi/setup-wizard-installation-options-for-creating-images.html#GUID-BB8713B0-0B79-497A-9341-729B6C8B924C" target="_blank">documentation</a>.
</p>
<!--HTML generated using hilite.me-->
<div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;">setup.exe -createGoldImage -destinationLocation c:\app\oracle\images
</pre>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9foushwCAuDH2C9WFLgjcKbpFMnlz_xJenayY-5_PVfJOQ2PlfX2au-5rkTAtULShIQos0OvPUJuZizsrToBaFojU2A7S2sueb5lp8ARf0jRzu1yJUdoGl0B8aufQ-ozDyy0OgU5ywsmlZoE5GuZ2STl8sbYphU4Cyl1bA55MtW1YALV77tVGIH_I/s779/2024-02-21%2016_38_42-Windows10%20Clone%20(dbhome_1%20patched)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="468" data-original-width="779" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9foushwCAuDH2C9WFLgjcKbpFMnlz_xJenayY-5_PVfJOQ2PlfX2au-5rkTAtULShIQos0OvPUJuZizsrToBaFojU2A7S2sueb5lp8ARf0jRzu1yJUdoGl0B8aufQ-ozDyy0OgU5ywsmlZoE5GuZ2STl8sbYphU4Cyl1bA55MtW1YALV77tVGIH_I/s320/2024-02-21%2016_38_42-Windows10%20Clone%20(dbhome_1%20patched)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="320" /></a>
</div>
<p>Wait for the installer to finish, then you should have the newly created image in the directory stated by -destinationLocation.</p>
<p><b>Create new Oracle Home and database</b></p>
<p>Next we create a new Oracle Home and a Database ORCL/ORCLPDB under dbhome_2. Create the new directory, change the ORACLE_HOME variable in oraenv.cmd to point to dbhome_2 and run it. Then unpack the 19.03 software to that directory the same way as dbhome_1 before.</p><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">C:\app>mkdir c:\app\oracle\product\19.0.0\dbhome_2
C:\app>oraenv.cmd
C:\app>cd %ORACLE_HOME%
C:\app\oracle\product\19.0.0\dbhome_2>tar xfz z:\Install\Windows\WINDOWS.X64_193000_db_home.zip
C:\app\oracle\product\19.0.0\dbhome_2>setup.bat
</pre>
</div>
<p>Run setup.exe in dbhome_2 and this time also create a database ORCL with a PDB ORCLPDB.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwGJg7ypIM4qMQDgbAT2g7vpVgCIvMr-khnd80mUcNmbGuCC6ut4ifxqVOJIayd477dPHsEDKlyxAqRuCx6Fkc7GR7Zqbf9Eh4j9XFwLi3l6WOdkWWphlkGrZqhG9xP2EtHjUoSiE_ne25oY35Sm0SN7rJ6gpwLfrqv2f7ikzVwNGNP7Yu6tMICzXV/s780/2024-02-21%2016_58_38-Windows10%20Clone%20(dbhome_1%20patched)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="589" data-original-width="780" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwGJg7ypIM4qMQDgbAT2g7vpVgCIvMr-khnd80mUcNmbGuCC6ut4ifxqVOJIayd477dPHsEDKlyxAqRuCx6Fkc7GR7Zqbf9Eh4j9XFwLi3l6WOdkWWphlkGrZqhG9xP2EtHjUoSiE_ne25oY35Sm0SN7rJ6gpwLfrqv2f7ikzVwNGNP7Yu6tMICzXV/s320/2024-02-21%2016_58_38-Windows10%20Clone%20(dbhome_1%20patched)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="320" /></a></div>So now we have a patched dbhome_1 as source for the Gold Image and an unpatched dbhome_2 running the database ORCL with the PDB ORCLPDB.<br /><p><b>Out-of-place patching using the Gold Image</b></p><p>For out-of-place patching, we need to create a new Oracle Home, where we unpack the Gold Image. Change the ORACLE_HOME in oraenv.cmd to dbhome_3 and run it.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">C:\app>oraenv.cmd
C:\app>mkdir c:\app\oracle\product\19.0.0\dbhome_3
C:\app>cd %ORACLE_HOME%
C:\app\oracle\product\19.0.0\dbhome_3>tar xfz c:\app\oracle\images\db_home_2024-02-21_05-21-14PM.zip
C:\app\oracle\product\19.0.0\dbhome_3>setup
</pre></div>
<p></p>
Run setup, choose software only and the oracle user instead of a virtual account. If setup.exe crashes with a Java EXCEPTION_ACCESS_VIOLATION, follow MOS note 2772729.1.<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGCTwjLvmvLxLtjKlS17txRkDYsrgulFV3KEn1LKQvb4E-i0DyxSyVbtIgZ6NcBsoSoQkC0IWIHTHCUUgQGBB3FAHD4xKVNxlZqTH_w9FBpViBhEWzMUg62wbqMFAQpgk8T9eqb7YWljEsHyJVZAvRlOBpZ-txNnKrzYVk5YVSzsrpg3Vcy63pBIy_/s532/2024-02-22%2013_57_21-Windows10%20Clone%20(Setup%20in%20dbhome_3%20durch)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="116" data-original-width="532" height="88" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGCTwjLvmvLxLtjKlS17txRkDYsrgulFV3KEn1LKQvb4E-i0DyxSyVbtIgZ6NcBsoSoQkC0IWIHTHCUUgQGBB3FAHD4xKVNxlZqTH_w9FBpViBhEWzMUg62wbqMFAQpgk8T9eqb7YWljEsHyJVZAvRlOBpZ-txNnKrzYVk5YVSzsrpg3Vcy63pBIy_/w400-h88/2024-02-22%2013_57_21-Windows10%20Clone%20(Setup%20in%20dbhome_3%20durch)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="400" /></a></div><br /><div>On Unix/Linux systems, we would already be done, but on Windows we have services which need to be migrated to the new Oracle Home.</div><div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7w_So_cMa88UDtnBpWBy15sBC5deGiYvuxR7Q5Sg8Z-2QYB_K98xsA9D8Iy0ywJvMWR_wbzUgP3haihnn505TdTlZdehbfv9Q-zg32hW7HsWG-4IflQFNl0vRYn5RabXrF73OvOPbX2VB6U21hGmGnlswtO3SfDs_J_BHiMS_ZWuxGSX5gIUxn7po/s980/2024-02-22%2014_00_24-Windows10%20Clone%20(Setup%20in%20dbhome_3%20durch)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="240" data-original-width="980" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7w_So_cMa88UDtnBpWBy15sBC5deGiYvuxR7Q5Sg8Z-2QYB_K98xsA9D8Iy0ywJvMWR_wbzUgP3haihnn505TdTlZdehbfv9Q-zg32hW7HsWG-4IflQFNl0vRYn5RabXrF73OvOPbX2VB6U21hGmGnlswtO3SfDs_J_BHiMS_ZWuxGSX5gIUxn7po/w640-h157/2024-02-22%2014_00_24-Windows10%20Clone%20(Setup%20in%20dbhome_3%20durch)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div><br /><div>In the registry, we see that the services are linked to a given Oracle Home, so these need to be migrated.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">set OLDORA_HOME=%ORACLE_BASE%\product\19.0.0\dbhome_2</pre><pre style="line-height: 125%; margin: 0px;"><br /></pre><pre style="line-height: 125%; margin: 0px;">rem --- stop all Oracle services first ---
net stop OracleOraDB19Home2MTSRecoveryService
net stop OracleOraDB19Home2TNSListener
net stop OracleServiceORCL
net stop OracleVssWriterORCL
</pre></div>
<div><br /></div><div>Stop all services from dbhome_2. For easier scripting, we point OLDORA_HOME to the Oracle home running the old version.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">rem --- Copy spfile and pwdfile to new ORACLE_HOME
copy %OLDORA_HOME%\database\SPFILEORCL.ORA %ORACLE_HOME%\database
copy %OLDORA_HOME%\database\PWDorcl.ora %ORACLE_HOME%\database
</pre></div>
<div><br /></div><div>Copy the spfile and pwdfile to dbhome_3</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">rem -- Delete old services
<span style="font-weight: bold;">%</span>OLDORA_HOME%<span style="color: #a31515;">\b</span>in<span style="color: #a31515;">\o</span>ramtsctl -delete
sc delete OracleOraDB19Home2TNSListener
</pre></div>
<div><br /></div><div>Delete the MTS and Listener services from the old home.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">rem --- Point services to new ORACLE_HOME
sc config OracleServiceORCL binPath="c:\app\oracle\product\19.0.0\dbhome_3\bin\ORACLE.EXE ORCL"
sc config OracleJobSchedulerORCL binPath="c:\app\oracle\product\19.0.0\dbhome_3\bin\extjob.exe ORCL"
sc config OracleVssWriterORCL binPath="c:\app\oracle\product\19.0.0\dbhome_3\bin\OraVSSW.exe ORCL"
</pre></div>
<div class="separator" style="clear: both; text-align: center;"><br /></div><div>Migrate the OracleService, JobScheduler and VssWriter from the old to the new home.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">rem --- create new services
<span style="font-weight: bold;">%</span>ORACLE_HOME%<span style="color: #a31515;">\b</span>in<span style="color: #a31515;">\o</span>ramtsctl -new
<span style="font-weight: bold;">%</span>ORACLE_HOME%<span style="color: #a31515;">\b</span>in<span style="color: #a31515;">\l</span>snrctl start
sc config "OracleOraDB19Home3TNSListener" start= auto
</pre></div>
<div><br /></div>
<div>The formerly deleted services from the old home need to be recreated for the new home. Starting the Listener automatically creates a new Service for the new home. That one should be configured to start automatically.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">rem --- start new services
oradim -EDIT -SID ORCL -STARTMODE auto -SRVCSTART system
net start OracleServiceORCL
</pre></div>
<div><br /></div><div>Set the Oracle service to be started automatically and to start the database on service start. Then start the OracleService.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">rem --- start the database and run datapatch
rem --- not needed with service auto start --- @echo startup | sqlplus / as sysdba
@echo alter pluggable database all open | sqlplus / as sysdba
@echo show pdbs | sqlplus / as sysdba
<span style="font-weight: bold;">%</span>ORACLE_HOME%<span style="color: #a31515;">\O</span>Patch<span style="color: #a31515;">\d</span>atapatch
</pre></div>
<div><br /></div><div>Before running the datapatch, make sure that all pds are open. When the open state has been saved by using ALTER PLUGGABLE DATABASE ... SAVE STATE, that step can be skipped. Here we open all PDB's before running the datapatch </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUovqZpoo_fGK68SbdDLdWfSieUxpVa7J8aBeGOe8-9GiRY7161wQdjd2C477JwLamEYaB7I3pAn7qEdQHBNGcJUN1aj2fAHg6MuF058SQmjOXcJWQip1RpwQBx6puXxxstip2mZ1PHUbefXPpT2GcLMnKVa2DtssTWvk89MRZuMIHUdxkzm6NKZbU/s658/2024-02-26%2016_15_52-Windows10%20Clone%20(Setup%20in%20dbhome_3%20durch)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="658" height="392" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUovqZpoo_fGK68SbdDLdWfSieUxpVa7J8aBeGOe8-9GiRY7161wQdjd2C477JwLamEYaB7I3pAn7qEdQHBNGcJUN1aj2fAHg6MuF058SQmjOXcJWQip1RpwQBx6puXxxstip2mZ1PHUbefXPpT2GcLMnKVa2DtssTWvk89MRZuMIHUdxkzm6NKZbU/w640-h392/2024-02-26%2016_15_52-Windows10%20Clone%20(Setup%20in%20dbhome_3%20durch)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>The database software and data dictionary should now be on the new version.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">rem --- apply optimizer fixes for every PDB
@echo @?/rdbms/admin/dbmsoptim.sql | sqlplus / as sysdba
@echo @?/rdbms/admin/prvtoptim.plb | sqlplus / as sysdba
@echo execute dbms_optim_bundle.enable_optim_fixes('ON','BOTH', 'YES'); | sqlplus / as sysdba
</pre></div>
<div><br /></div><div>Last step is enabling the optimizer fixes for the new version. The complete scripting can be found on <a href="https://gitlab.com/abruenin236/oracle-out-of-place-patching-windows/-/tree/master" target="_blank">GitLab</a>.</div><div><br /></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-30250902938790507682023-11-13T03:45:00.000-08:002023-11-13T03:45:36.492-08:00Create an APEX Interactive Grid on an ORDS AutoREST service<p> If the target database cannot be accessed by a database link, this might be a super easy alternative.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHAYiFfLVDRpBOCsO1VpPYP_L3I5k1JcxRIeF6mMb0_aqIVMokgqUEVchQ4S21Z2BiYhpLY03udkE5-g8Aqfa-vPM08_FidRALxWQsY8eCY-1t4iPEthc1xoVwg8g5kN3Qr1TeGZDzyhfZITsspjr5uBuPXwhs6VXA8fQrOUQRgdp14c_xDXS3B4Cn/s564/2023-11-10%2015_12_14-Outlook%20-%20Sales-EMEA-JAPAC%20-%20Slack.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="564" data-original-width="469" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHAYiFfLVDRpBOCsO1VpPYP_L3I5k1JcxRIeF6mMb0_aqIVMokgqUEVchQ4S21Z2BiYhpLY03udkE5-g8Aqfa-vPM08_FidRALxWQsY8eCY-1t4iPEthc1xoVwg8g5kN3Qr1TeGZDzyhfZITsspjr5uBuPXwhs6VXA8fQrOUQRgdp14c_xDXS3B4Cn/s320/2023-11-10%2015_12_14-Outlook%20-%20Sales-EMEA-JAPAC%20-%20Slack.png" width="266" /></a></div><p>Say you have an HR schema with the EMPLOYEES table. RMB and choose <i>Enable REST Service ...</i></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRTQNdBiiEv0DDL720TH5X7eDcIHBbOMBdFhZPd3FMYc0J18A4Y4v63ckebqi40bcNF-XcrOmKQX2cXmfjEbVGzNwsqgcT0eWxB5ESef_HpIAQ2PTn-OzOzFjVnebF1NvC60CiVaNpnywPLMqMI0HJfl8rbfq8Saw9GXSSTAduKeeqnicyVHPg5Icg/s618/2023-11-10%2015_12_48-RESTful%20Services%20Wizard%20-%20Step%201%20of%202.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="468" data-original-width="618" height="303" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRTQNdBiiEv0DDL720TH5X7eDcIHBbOMBdFhZPd3FMYc0J18A4Y4v63ckebqi40bcNF-XcrOmKQX2cXmfjEbVGzNwsqgcT0eWxB5ESef_HpIAQ2PTn-OzOzFjVnebF1NvC60CiVaNpnywPLMqMI0HJfl8rbfq8Saw9GXSSTAduKeeqnicyVHPg5Icg/w400-h303/2023-11-10%2015_12_48-RESTful%20Services%20Wizard%20-%20Step%201%20of%202.png" width="400" /></a></div>For this easy example, check <i>Enable object </i>and uncheck <i>Authorization required</i>. Click through the dialog until the end.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQOxOhWNWtxugZmeRkfhTSDQwdhqtkb_N0ACOGtUiF07CGCmjExFYoc_Yk0kDPOgGEf7VmquLEtgNxQ63_5Qq0c-9JC8uFpgA6z__hs9PKrK2_zDtYLnAZ1wSwYdQoErnKrSnKcW1CtRsMPIgcLudXhAegraMCHtN2WLxegEXOl-DPTIvb1LOrn7Z2/s1777/2023-11-13%2012_20_17-AutoREST%20_%20REST%20_%20Oracle%20Database%20Actions%20-%20Vivaldi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="880" data-original-width="1777" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQOxOhWNWtxugZmeRkfhTSDQwdhqtkb_N0ACOGtUiF07CGCmjExFYoc_Yk0kDPOgGEf7VmquLEtgNxQ63_5Qq0c-9JC8uFpgA6z__hs9PKrK2_zDtYLnAZ1wSwYdQoErnKrSnKcW1CtRsMPIgcLudXhAegraMCHtN2WLxegEXOl-DPTIvb1LOrn7Z2/w640-h317/2023-11-13%2012_20_17-AutoREST%20_%20REST%20_%20Oracle%20Database%20Actions%20-%20Vivaldi.png" width="640" /></a></div><div>Open Database Actions and go to REST > AutoREST to find the EMPLOYEES Service. Click on the <i>Open in new tab </i>icon right of the URL.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWJ6wUKjsAzTvs_ub7ZbgYEeXX_PS7ZVtyNz-2zdO5F0WgfKeZUMOusheAMTKURR8kHuAvwEQGJd1zxqWkBU3Rrq7tAWKo1b1IgaiF4mXmloLQ35cZ-WeBVKQvjESzuEgORE1QAHTvoM_4VTFjx65Q6sUgU1d4rKPMy7gZ90aKz_HvZlayBv2DLxQ4/s959/2023-11-13%2012_22_24-http___vm23c_8080_ords_hr_employees_%20%E2%80%93%20Mozilla%20Firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="896" data-original-width="959" height="299" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWJ6wUKjsAzTvs_ub7ZbgYEeXX_PS7ZVtyNz-2zdO5F0WgfKeZUMOusheAMTKURR8kHuAvwEQGJd1zxqWkBU3Rrq7tAWKo1b1IgaiF4mXmloLQ35cZ-WeBVKQvjESzuEgORE1QAHTvoM_4VTFjx65Q6sUgU1d4rKPMy7gZ90aKz_HvZlayBv2DLxQ4/s320/2023-11-13%2012_22_24-http___vm23c_8080_ords_hr_employees_%20%E2%80%93%20Mozilla%20Firefox.png" width="320" /></a></div><div>That should work ootb, copy the URL</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiewLaRvZti7cb41P8kb3v5ukY5zWd4b5Nwf4JnlE7u8dMN6jl3tBQel4pQQKvlAx3eYeZRRPlpDOyUhHHwH5uVFtq11WComEE4VkoiGzj3zO7RE2W8HSPj9zWHe0Mvpts98tjXqZ660sIbUjk79TyH_IKQTOZbL-wEYhz5ND7eHyt_0UGstuy0Qhbx/s975/2023-11-13%2012_26_36-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="382" data-original-width="975" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiewLaRvZti7cb41P8kb3v5ukY5zWd4b5Nwf4JnlE7u8dMN6jl3tBQel4pQQKvlAx3eYeZRRPlpDOyUhHHwH5uVFtq11WComEE4VkoiGzj3zO7RE2W8HSPj9zWHe0Mvpts98tjXqZ660sIbUjk79TyH_IKQTOZbL-wEYhz5ND7eHyt_0UGstuy0Qhbx/w640-h250/2023-11-13%2012_26_36-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" width="640" /></a></div><div>Move over to the APEX App Builder, Shared Components, REST Data Sources and click on <i>Create</i>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0E1RKMSuYEN2Iuy__yX6WiXiH-8R6508hkXeQHDun8wFIclB9iMSTLBSf0oQ0xz7WzAKF64nVU3cqDTg8ieyK3-9wShgDCRZ056mnUcz6UzsPd79koqAify2gpo60Vw6CLC70aE2Lks9AhNHtyoOgbfSJMc1wEuwwGGHhK_MhnOy_KpZMobePnIh-/s991/2023-11-13%2012_29_09-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="426" data-original-width="991" height="277" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0E1RKMSuYEN2Iuy__yX6WiXiH-8R6508hkXeQHDun8wFIclB9iMSTLBSf0oQ0xz7WzAKF64nVU3cqDTg8ieyK3-9wShgDCRZ056mnUcz6UzsPd79koqAify2gpo60Vw6CLC70aE2Lks9AhNHtyoOgbfSJMc1wEuwwGGHhK_MhnOy_KpZMobePnIh-/w640-h277/2023-11-13%2012_29_09-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" width="640" /></a></div><div>Choose <i>from scratch</i>, give it a name, paste the service URL and change <i>REST Data Source Type</i> to <i>Oracle REST Data Services.</i> Click through the end of the dialog, accepting the defaults.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE59N2gAj23vx84abxh_iVrS4wV6rC0JVizx6c03biKeNlI6jP3SDWOnmuxrPw1zV7BsM0kV_x62TvDbwYmxYz4pA2fSFzWrKh_SX-4_3jd1rm3EuzbL7JWVP2iQNOgMJ0a1MJifSw-juNBDPAWzexONSrqaQPEndpmuUVZjwpyyb3S2w0mg2Ihcs5/s981/2023-11-13%2012_34_06-App%20Builder%20%E2%80%93%20Mozilla%20Firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="744" data-original-width="981" height="486" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE59N2gAj23vx84abxh_iVrS4wV6rC0JVizx6c03biKeNlI6jP3SDWOnmuxrPw1zV7BsM0kV_x62TvDbwYmxYz4pA2fSFzWrKh_SX-4_3jd1rm3EuzbL7JWVP2iQNOgMJ0a1MJifSw-juNBDPAWzexONSrqaQPEndpmuUVZjwpyyb3S2w0mg2Ihcs5/w640-h486/2023-11-13%2012_34_06-App%20Builder%20%E2%80%93%20Mozilla%20Firefox.png" width="640" /></a></div>In your application, create a new page with an Interactive Grid. Point it to the new REST Data Source and check <i>Editing Enabled</i>, if you want to use that.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidLEjaTxdwJ1_3_3n-nnib6t40TQX3avpSdngBN4eqTYmZYjPqLc0zYLtDJZGiofcBRv2LPuWRXKe7_Q7dva-D-5tAdLHt1e3rdHONF8qwe4FhhfR-IDZbwo7hZ7A-TpM_CT7-GQdUm0bcBIGQrT5zHDX9jf0KtpwC9NdfNWlT5pYs79-s-_Aw_3hK/s985/2023-11-13%2012_36_01-App%20Builder%20%E2%80%93%20Mozilla%20Firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="739" data-original-width="985" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidLEjaTxdwJ1_3_3n-nnib6t40TQX3avpSdngBN4eqTYmZYjPqLc0zYLtDJZGiofcBRv2LPuWRXKe7_Q7dva-D-5tAdLHt1e3rdHONF8qwe4FhhfR-IDZbwo7hZ7A-TpM_CT7-GQdUm0bcBIGQrT5zHDX9jf0KtpwC9NdfNWlT5pYs79-s-_Aw_3hK/w640-h480/2023-11-13%2012_36_01-App%20Builder%20%E2%80%93%20Mozilla%20Firefox.png" width="640" /></a></div>For editing, it is mandatory to select a primary key column. Click through the end of that dialog.<div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgDvPlmkC-9h7a7wWLcLraQDIwMN2_G4gxKStUb48LJFSbLrBWEVaR-pBLX78TPfxnz2AtV5vZb0fgMSZr4zWvjkQbdX3-Ecqa-txwIjfHZO7PfAgPQVgwPljtN2KOCybuMkG-jry_NvYiFBGPfXpA2GkiUMnJWnT2O5cob4TbxaaLQs6Cr4eZqV7x3" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="422" data-original-width="1517" height="178" src="https://blogger.googleusercontent.com/img/a/AVvXsEgDvPlmkC-9h7a7wWLcLraQDIwMN2_G4gxKStUb48LJFSbLrBWEVaR-pBLX78TPfxnz2AtV5vZb0fgMSZr4zWvjkQbdX3-Ecqa-txwIjfHZO7PfAgPQVgwPljtN2KOCybuMkG-jry_NvYiFBGPfXpA2GkiUMnJWnT2O5cob4TbxaaLQs6Cr4eZqV7x3=w640-h178" width="640" /></a></div>Run the page, change some data and click <i>Save</i>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEismBhhWw_hhCEzsmoDoyOpz1jsva3HI4AI5rgfSeYvP3j7peZpBIHiqpbRzh4II_uGyORqqYlaQ9nz7t2Ltk8H7bLMC_YhBh_lR0nzygQTk0yIuiHBj9mWobOXxFKjUvDRfv17oWJbvN9C3S4ds5nYovB2x-aCMWHk4oAs69_VHCZygkJb-we7CqtT/s891/2023-11-13%2012_38_35-EmpREST%20%E2%80%93%20Mozilla%20Firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="416" data-original-width="891" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEismBhhWw_hhCEzsmoDoyOpz1jsva3HI4AI5rgfSeYvP3j7peZpBIHiqpbRzh4II_uGyORqqYlaQ9nz7t2Ltk8H7bLMC_YhBh_lR0nzygQTk0yIuiHBj9mWobOXxFKjUvDRfv17oWJbvN9C3S4ds5nYovB2x-aCMWHk4oAs69_VHCZygkJb-we7CqtT/w400-h186/2023-11-13%2012_38_35-EmpREST%20%E2%80%93%20Mozilla%20Firefox.png" width="400" /></a></div>That should work without any extra manual configuration or coding.Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-75887976754073705842023-05-02T08:58:00.004-07:002023-05-31T02:01:26.526-07:00Installing ORDS 23.1 with Apex 23.1 on Oracle Database 23c Free Developer Release<p>This post is part of my <a href="https://arnes-stuff.blogspot.com/2020/05/the-oracle-database-developer-vm-project.html">Oracle Developer VM Project</a> series. It is not meant to replace the official documentation in any way and what I describe is no recommended configuration. It is only meant to be a guide, if you follow my DB Developer VM Project and want to add these services to your VM.</p>
<b>Part 1: Install Apex</b><p><span>Download the </span><a href="https://www.oracle.com/tools/downloads/apex-downloads.html" target="_blank">Apex install bundle</a><span> and unzip it (eg. to /u01), which creates an apex folder. In the unpacked folder run the installer</span></p><div><!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sqlplus sys/your_password@freepdb1 as sysdba @apexins sysaux sysaux temp /i/
</pre></div><div><br /></div><div>Leave the session open and create the Apex Admin user by running <span style="font-family: courier;">@apxchpwd.sql</span>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ4djHJdEpjDigY_ATylNeg4Ocd2nTdasuDOcbOZEq_zAVZG3qJ2iY0gzEZatOTJkzHNJVPscVl8zmv3YuUNJ1Qsxcteejl2OkY3sD65XeDW1QVGQ-4n0l8t6yaKPr8Knv7IDaKk7P9A/s741/2021-02-02+16_01_21-OL8+DBDev+%2528Vor+Apex+Admin%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="257" data-original-width="741" height="139" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ4djHJdEpjDigY_ATylNeg4Ocd2nTdasuDOcbOZEq_zAVZG3qJ2iY0gzEZatOTJkzHNJVPscVl8zmv3YuUNJ1Qsxcteejl2OkY3sD65XeDW1QVGQ-4n0l8t6yaKPr8Knv7IDaKk7P9A/w400-h139/2021-02-02+16_01_21-OL8+DBDev+%2528Vor+Apex+Admin%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div>Unlock the APEX_PUBLIC_USER and change his password, which has been randomly set at installation</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #007020; font-weight: bold;">alter</span> <span style="color: #007020; font-weight: bold;">user</span> apex_public_user identified <span style="color: #007020; font-weight: bold;">by</span> oracle account unlock;
</pre></div>
<div><br /></div><div>Still in the same session, run <span style="font-family: courier;">@apex_rest_config.sql</span> and set both passwords for the APEX_LISTENER user and the APEX_REST_PUBLIC_USER user.</div><div><br /></div><div>To use web services and for sending email, network services need to be enabled. Copy the following from the <a href="https://docs.oracle.com/en/database/oracle/apex/22.2/htmig/enabling-network-services-in-oracle-db11g-or-later.html#GUID-CA19B8DF-B210-46FC-BC3A-F0DC76AE5625" target="_blank">documentation</a> and run it:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3
4
5
6
7</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #007020; font-weight: bold;">BEGIN</span>
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
<span style="color: #007020; font-weight: bold;">host</span> <span style="color: #666666;">=></span> <span style="color: #4070a0;">'*'</span>,
ace <span style="color: #666666;">=></span> xs<span style="border: 1px solid rgb(255, 0, 0);">$</span>ace_type(privilege_list <span style="color: #666666;">=></span> xs<span style="border: 1px solid rgb(255, 0, 0);">$</span>name_list(<span style="color: #4070a0;">'connect'</span>),
principal_name <span style="color: #666666;">=></span> <span style="color: #4070a0;">'APEX_230100'</span>,
principal_type <span style="color: #666666;">=></span> xs_acl.ptype_db));
<span style="color: #007020; font-weight: bold;">END</span>;
</pre></td></tr></tbody></table></div>
<div><br /></div><div><b>Part 2: Install ORDS</b></div><div>
<p>First, we need to make some settings. Add the following to .bashrc and source it.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">export _JAVA_OPTIONS="-Xms3000M -Xmx3000M"
export ORDS_CONFIG=/u01/ords-config
export ORDS_HOME=/u01/ords-23-1
export PATH=$ORDS_HOME/bin:$PATH</pre></div><div><br /></div>
Create both directories:</div><div><br />
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">mkdir /u01/ords-23-1
mkdir /u01/ords-config</pre></div></div><div><br /></div><div><div>Download the latest ORDS from <a href="https://download.oracle.com/otn_software/java/ords/ords-latest.zip">https://download.oracle.com/otn_software/java/ords/ords-latest.zip</a> and unzip the contents to your target directory (eg. /u01/). Optional rename the ords directory from the archive and add the ORDS version number, eg. ords-23-1 (and reflect that in the $ORDS_HOME variable in .bashrc). This makes it easier to switch versions when neccesary.</div><div>As $PATH and $ORDS_CONFIG are already set, from anywhere run</div></div><div>
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">ords install --interactive
</pre></div>
</div><div><br /></div><div>ORDS will ask for some configuration parameters. In most cases, you can just accept the defaults.</div><div>If you have followed my guide so far, the only parameters, that need to be set, are:</div><div><ul style="text-align: left;"><li>Enter the database service name [orcl]: freepdb1</li><li>Provide database username with administrator privileges: sys (and your password)</li><li>Enter the APEX static resources location: /u01/apex/images/</li></ul></div><div>After the setup, ORDS will keep running in standalone mode. We are not done yet, but give it a try to check if everything went fine so far. Wait until the ORDS has completely started: </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFrmjECpUOAQUxEUaJqEZB9kREeGEM-n7mA6Hmzoc0S29msaiBePmEH6lqlK4I_aK_J6ZFhsnEmuNPVGL1S84DK0-_d95iGQa9xltAXx6v3CZNT1vD5mNvP84MpgeeQIKlgeSBIPl_LkYjBOyhsg0TknaVy0TfmYgVyYc-mAG7B4fkuE3K71qc6A/s957/ORDS%20Started.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="128" data-original-width="957" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFrmjECpUOAQUxEUaJqEZB9kREeGEM-n7mA6Hmzoc0S29msaiBePmEH6lqlK4I_aK_J6ZFhsnEmuNPVGL1S84DK0-_d95iGQa9xltAXx6v3CZNT1vD5mNvP84MpgeeQIKlgeSBIPl_LkYjBOyhsg0TknaVy0TfmYgVyYc-mAG7B4fkuE3K71qc6A/w640-h86/ORDS%20Started.png" width="640" /></a></div><div>Open Firefox and enter <a href="http://localhost:8080/ords">http://localhost:8080/ords</a>, that should give you the Apex login page (as this is the first call, it will take a few seconds).</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpTPB1N4iN3AW8ISJKCfvE_4RGfUGcugCx7elE3IsBaH53unhK8rX2qt4ZbvQTj__q02UAkTS3nLJLRNbm1HrsZgVgazFGEf5idW_0hw55Yj1yYBY_K-u2xyBfNQQOvr_d-3zp3Pt1NQ/s833/2021-02-02+18_19_39-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="708" data-original-width="833" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpTPB1N4iN3AW8ISJKCfvE_4RGfUGcugCx7elE3IsBaH53unhK8rX2qt4ZbvQTj__q02UAkTS3nLJLRNbm1HrsZgVgazFGEf5idW_0hw55Yj1yYBY_K-u2xyBfNQQOvr_d-3zp3Pt1NQ/s320/2021-02-02+18_19_39-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div><div>Looking at the ORDS terminal window, you will see the following warnings:</div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtuWT5F8blYLd82o4Hbyp6Cw3_6kkzU57bwdHoaasi6T-3ew6rXKthKg_8f4GZdYgTahgvBgSeY0QQIt1CF5z6JSmrqmSUXZOy0VzeNb7j3vg3-VAAP3hgrvO1siA7Cuod3owdC7PV_HzPgi9J731ATrS5u1E2SVbPVqON43FdkZw3-s861ZkZsQ/s979/2022-12-16%2012_27_48-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="74" data-original-width="979" height="48" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtuWT5F8blYLd82o4Hbyp6Cw3_6kkzU57bwdHoaasi6T-3ew6rXKthKg_8f4GZdYgTahgvBgSeY0QQIt1CF5z6JSmrqmSUXZOy0VzeNb7j3vg3-VAAP3hgrvO1siA7Cuod3owdC7PV_HzPgi9J731ATrS5u1E2SVbPVqON43FdkZw3-s861ZkZsQ/w640-h48/2022-12-16%2012_27_48-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div>Though this is not a production environment, I prefer to configure the system to run without these warnings. At least it makes it easier to notice, if something really goes wrong. In this single user environment, we can set both parameters to lower values like below. <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7eBSjl0LNSpjO8kGJDAsK2EJkKF05FJnHmCCyzD1jzJFaPoSwqHANs76B4XWhkLmZrXWbkJsA_vI0Ma2IW4XAfPl7Id7sUVDCJn0IZepRR7HTnkg3ZhUeW05kiwPJF8bXDBs9w-tZj3jJ3D6Mml35pKemv7VmpQdWMT_Sz92uCoA2t7TnKQc57g/s715/2022-12-16%2012_30_52-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="335" data-original-width="715" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7eBSjl0LNSpjO8kGJDAsK2EJkKF05FJnHmCCyzD1jzJFaPoSwqHANs76B4XWhkLmZrXWbkJsA_vI0Ma2IW4XAfPl7Id7sUVDCJn0IZepRR7HTnkg3ZhUeW05kiwPJF8bXDBs9w-tZj3jJ3D6Mml35pKemv7VmpQdWMT_Sz92uCoA2t7TnKQc57g/w400-h188/2022-12-16%2012_30_52-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" width="400" /></a></div><div>Go to /u01/ords-config/global/ and edit settings.xml. Add the following lines before the closing </properties>:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(248, 248, 248); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;"><entry</span> <span style="color: #7d9029;">key=</span><span style="color: #ba2121;">"jdbc.MaxLimit"</span><span style="color: green; font-weight: bold;">></span>30<span style="color: green; font-weight: bold;"></entry></span>
<span style="color: green; font-weight: bold;"><entry</span> <span style="color: #7d9029;">key=</span><span style="color: #ba2121;">"jdbc.InitialLimit"</span><span style="color: green; font-weight: bold;">></span>10<span style="color: green; font-weight: bold;"></entry></span>
</pre></div>
<div><br /></div><div>I also got the following error:</div><div><span style="font-family: courier;">INFO Disabling document root because the specified folder does not exist: /u01/ords-config/global/doc_root</span></div><div>To get rid of this INFO either create that directory or edit /u01/ords-config/global/settings.xml and set standalone.doc.root to an existing folder.</div><div><br /></div><div>Sometimes I ran into errors were all like <span style="font-family: courier;">WARNING The pool named: |apex|al| is invalid and will be ignored: The username or password for the connection pool named |apex|al|, are invalid, expired, or the account is locked</span></div><div>Probably I messed up my passwords when running the installer. This can be fixed by setting the passwords for the following users (and unlocking them, just in case):</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3
4
5
6
7
8</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> ORDS_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_LISTENER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_REST_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> ORDS_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_LISTENER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_REST_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
</pre></td></tr></tbody></table></div>
<div><br /></div><div>Now ORDS should come up without errors.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo4pkNGKFLnMINOV39F07W7jjpH0zcUrV2xr8Egn15_irotluDJSowjZf9gGWUPxuryPA7qgbLgVNM7yccnFCoRGJUTNQJSPhpvcjUMJDDKU8ESDF-r72NE2S91ujJwtscPH8IC-QAmxb9jxuKNkfmtfbR7ANcLl3Ys8e7pBl8GapIvwfdd73W0Q/s919/2022-12-16%2012_24_40-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="268" data-original-width="919" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo4pkNGKFLnMINOV39F07W7jjpH0zcUrV2xr8Egn15_irotluDJSowjZf9gGWUPxuryPA7qgbLgVNM7yccnFCoRGJUTNQJSPhpvcjUMJDDKU8ESDF-r72NE2S91ujJwtscPH8IC-QAmxb9jxuKNkfmtfbR7ANcLl3Ys8e7pBl8GapIvwfdd73W0Q/w640-h186/2022-12-16%2012_24_40-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Just to double check that everything is there, call http://localhost:8080/ords/sql-developer</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXp_s1NM8Y7zsNOocmp8tNGi-D23A6BTiurMzPCTfk2lRo-f9ZgEp8NNb2Qzo0pwYfcTR_3CpN2iJIMdwm1QuJL31TQhUyF1Edo4jvQKqul6Ydn767pV7-GTFbRrd-Bll-11jC_AqJXUWnyvctWaS63IORtkkaaCjqrmu92WPZeHO3lfRKS_0ZMQ/s974/2023-05-02%2017_56_50-Sign-in%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="792" data-original-width="974" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXp_s1NM8Y7zsNOocmp8tNGi-D23A6BTiurMzPCTfk2lRo-f9ZgEp8NNb2Qzo0pwYfcTR_3CpN2iJIMdwm1QuJL31TQhUyF1Edo4jvQKqul6Ydn767pV7-GTFbRrd-Bll-11jC_AqJXUWnyvctWaS63IORtkkaaCjqrmu92WPZeHO3lfRKS_0ZMQ/s320/2023-05-02%2017_56_50-Sign-in%20%E2%80%93%20Mozilla%20Firefox.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>Of course, you need a rest enabled schema to log in. That's it, everything is running.Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-86079468795911003892023-04-25T09:14:00.009-07:002023-04-25T09:16:43.273-07:00Install Oracle 23c Developer Edition in Oracle Linux 8 VM<p>The Oracle 23c Developer Release is available as a complete, <a href="https://www.oracle.com/database/technologies/databaseappdev-vm.html" target="_blank">ready-to-run VM</a> with a complete set of tools. But if you want, for whatever reason, build your own VM, you might want to follow this guide.</p><p>Start with a fresh Oracle Linux 8.7 VM like the one from <a href="https://arnes-stuff.blogspot.com/2020/05/the-oracle-database-developer-vm-project.html" target="_blank">The Oracle DB Developers VM project</a> and run a <i>sudo dnf upgrade</i> to make sure to be on the latest patches. Avoid using Red Hat's historic kernels and boot with the latest kernel provided by Oracle.</p><p>Download the <a href="https://www.oracle.com/database/technologies/free-downloads.html" target="_blank">rpm</a> and follow the <a href="https://docs.oracle.com/en/database/oracle/oracle-database/23/xeinl/installation-guide.html#GUID-31891F22-B1FA-4489-A1C5-195E6B3D89C8" target="_blank">installation guide</a> from Oracle. My OL installation only found the preinstallation packages for 19c and 21c, but not for 23c. So I followed the guide for Red Hat Linux, which worked.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #888888;">sudo -s</span></pre><pre style="line-height: 125%; margin: 0px;"><span style="color: #888888;">curl -L -o oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/developer/x86_64/getPackage/oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm</span>
<span style="color: #888888;">dnf -y localinstall oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm</span>
</pre><pre style="line-height: 125%; margin: 0px;"><span style="color: #888888;">dnf -y localinstall /home/oracle/ddrive/Install/Linux-x64/oracle-database-free-23c-1.0-1.el8.x86_64.rpm
/etc/init.d/oracle-free-23c configure
</span></pre></div>
<p>When the installer is done, follow the installation guide and set the variables in .bashrc and source it:</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #888888;">export ORACLE_SID=FREE</span>
<span style="color: #888888;">export ORAENV_ASK=NO</span>
<span style="color: #888888;">. /opt/oracle/product/23c/dbhomeFree/bin/oraenv</span>
<span style="color: #888888;">export PATH=$ORACLE_HOME/bin:$PATH</span>
</pre></div>
<p>Take a first look at the DB, it is ready to run now.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ_ewG2uqY57qtGPxtPl1eK5Z9-c6CltkC4D4RVbjYreEzzQMtTvNwezp-_Y60_wmZmr2wZgmuQb8CJE7LBbpZaAoR-qvOJDBTxhAIq2YbqbZpkGh78SKgP3mgiGewAvvMwf33miJMATeRE6oxdfzPBlafF9oja7AgbIb57-_muok_IbY5FoYY6Q/s699/2023-04-25%2016_51_42-Window.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="469" data-original-width="699" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ_ewG2uqY57qtGPxtPl1eK5Z9-c6CltkC4D4RVbjYreEzzQMtTvNwezp-_Y60_wmZmr2wZgmuQb8CJE7LBbpZaAoR-qvOJDBTxhAIq2YbqbZpkGh78SKgP3mgiGewAvvMwf33miJMATeRE6oxdfzPBlafF9oja7AgbIb57-_muok_IbY5FoYY6Q/w400-h269/2023-04-25%2016_51_42-Window.png" width="400" /></a></div>Download the latest SQLcl and unzip it to your favorite tools location like<br />
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #888888;">wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip
unzip sqlcl-latest.zip -d ~/bin</span></pre></div>
<p>Add SQLcl to your PATH and also add a TNS_ADMIN variable to your .bashrc and source it.</p><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;"><span style="color: #888888;">export PATH=/home/oracle/sqlcl/bin:$PATH
</span><span style="color: #888888;">export SQLPATH=~/sql</span>
</pre></div><p>Make some settings for SQLcl for a nicer experience </p><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;"><span style="color: #888888;">mkdir ~/sql</span></pre><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;"><span style="color: #888888;">cat >> ~/sql/login.sql <<EOF
set statusbar on
set highlighting on
EOF</span></pre></pre></div><p>Now we have SQLcl:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxz__GASMry8J4jt1TqFHvV6KRj3FuE3ymn1MB7M7QM56zsd_ZggFBgxE2hLybvW8em-bUJ0xG32a88nfeNRboXp18X50r5twiA-ZgG0ZNCmgG3FhzpxihAjANZqBiOTyXsF-O8vOUpoXoP1w8ik8A3b9aqTHgWLpQge_Ti3Z6vnKn83w9vnNULQ/s596/2023-04-25%2017_10_43-Window.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="378" data-original-width="596" height="254" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxz__GASMry8J4jt1TqFHvV6KRj3FuE3ymn1MB7M7QM56zsd_ZggFBgxE2hLybvW8em-bUJ0xG32a88nfeNRboXp18X50r5twiA-ZgG0ZNCmgG3FhzpxihAjANZqBiOTyXsF-O8vOUpoXoP1w8ik8A3b9aqTHgWLpQge_Ti3Z6vnKn83w9vnNULQ/w400-h254/2023-04-25%2017_10_43-Window.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: left;">Download SQLDeveloper from https://www.oracle.com/database/sqldeveloper/technologies/download/<br />I prefer the Other Platforms version. Unzip it to its destination.</div><div class="separator" style="clear: both; text-align: left;"><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #888888;">unzip ~/ddrive/Install/Generic/sqldeveloper-23.1.0.097.1607-no-jre.zip -d ~/bin</span>
</pre></div>
<p>Look <a href="https://arnes-stuff.blogspot.com/2020/08/the-oracle-db-developer-vm-installing.html" target="_blank">here</a> on how to add SQLDeveloper to the Gnome menu. Run SQLDeveloper, it will tell you if you need to adjust the JDK location at startup.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdCOmhPk3PSMIyHw9PdgHD7AMHNYgYs7Y5jGwUIDDINw41t-kRwfbOv6_X5cXPP1eIClcAD5lzERLvWCMMIbodf3q8p-7pj6v2juwqbwKBPyjGhKdcfGtdWjjZU3bBwnTHzTTKdSqT3ItD1JSVnykwWAgGw6Zdk2OXvDza-AAycbHETx0pDtLinQ/s1496/2023-04-25%2017_58_31-Window.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="938" data-original-width="1496" height="402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdCOmhPk3PSMIyHw9PdgHD7AMHNYgYs7Y5jGwUIDDINw41t-kRwfbOv6_X5cXPP1eIClcAD5lzERLvWCMMIbodf3q8p-7pj6v2juwqbwKBPyjGhKdcfGtdWjjZU3bBwnTHzTTKdSqT3ItD1JSVnykwWAgGw6Zdk2OXvDza-AAycbHETx0pDtLinQ/w640-h402/2023-04-25%2017_58_31-Window.png" width="640" /></a></div>Create a connection<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_GDrCXsiBLaDepbDsZt02rjMDPqvpPsPNwrl5TAWlxsr4J0ozLI_hGpwNwtYAkT094QurgSJwBlwbT2YUyzov97Mzi6FTMyTouEzJzsnHFW1eYsh0m6rdSfsX0tKxOoUplVi4pdn09uDzm_Dmdzgv005b_PLxPFdg6PpiOzyMoxzUBb-JJU0PkQ/s773/2023-04-25%2018_02_22-Window.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="492" data-original-width="773" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_GDrCXsiBLaDepbDsZt02rjMDPqvpPsPNwrl5TAWlxsr4J0ozLI_hGpwNwtYAkT094QurgSJwBlwbT2YUyzov97Mzi6FTMyTouEzJzsnHFW1eYsh0m6rdSfsX0tKxOoUplVi4pdn09uDzm_Dmdzgv005b_PLxPFdg6PpiOzyMoxzUBb-JJU0PkQ/w400-h255/2023-04-25%2018_02_22-Window.png" width="400" /></a></div><br /><div>Follow this guide on how to install<a href="https://arnes-stuff.blogspot.com/2023/02/the-oracle-db-developer-vm-installing.html" target="_blank"> VSCodium and the Oracle Developer Tools</a> for VSCode. Create a new Database connection in VSCodium to freepdb1.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgzn9mjIT543HOemfDVrnTqO_-DcQQrQ6I6w6UQBK0V_2YwMt_n6e47aH2isBW1KClI-zrZCFZQYyUQgr0Ea6nMwAQBkUGf-_pFzEGDS9GC7h7QPjetFbP824T7PMuTRefvc-UWn2I5xhJJknXmDNdbGjZrRG3_b8_QWlBe5xBhTcz4Hr8zsNoGw/s598/2023-04-25%2018_10_24-Window.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="598" data-original-width="570" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgzn9mjIT543HOemfDVrnTqO_-DcQQrQ6I6w6UQBK0V_2YwMt_n6e47aH2isBW1KClI-zrZCFZQYyUQgr0Ea6nMwAQBkUGf-_pFzEGDS9GC7h7QPjetFbP824T7PMuTRefvc-UWn2I5xhJJknXmDNdbGjZrRG3_b8_QWlBe5xBhTcz4Hr8zsNoGw/w381-h400/2023-04-25%2018_10_24-Window.png" width="381" /></a></div><div><p>So far, this is quite a complete environment to start with Oracle 23c Developers Edition.</p><p><br /></p></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-12172556074268123472023-04-13T03:38:00.003-07:002023-04-13T03:43:01.215-07:00Cloning a PDB with APEX pointing to ORDS REST services on the same database<p>This post shows cloning a database with APEX and some database REST services in the same database, which are accessed from APEX via a REST data source. Say we have a PDB testpdb and clone it to clonepdb for dev/test. The EMPLOYEES table in HR is REST enabled and the APEX application has a REST Data Source for that REST service. Without any changes, the REST Data Source from clonepdb would still point to testpdb. But it should point to clonepdb. This could be changed manually, but if this is needed for automatic provisioning of developer environments, some automation would be helpfull.</p><p>The URL is shown in ORDS Database Actions under REST/AutoREST</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeUc3o5S0pSPDUjlcWJkKruofGayLoJkupwiWxQIXLGyvGJuAue0mNI_NpUc24_UxJIp1W7qVm0v3LVoWMGAiFlf5enn_g-MJY8BCMagRju2egCV6hyRvw3K2z8JDTgIaxSIIak_QcGaXrS5wWPf8pNGkIDOainmLAAKZq7H2aiRGXxpepMmtNyA/s763/2023-04-13%2010_10_41-AutoREST%20_%20REST%20_%20Oracle%20Database%20Actions%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="413" data-original-width="763" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeUc3o5S0pSPDUjlcWJkKruofGayLoJkupwiWxQIXLGyvGJuAue0mNI_NpUc24_UxJIp1W7qVm0v3LVoWMGAiFlf5enn_g-MJY8BCMagRju2egCV6hyRvw3K2z8JDTgIaxSIIak_QcGaXrS5wWPf8pNGkIDOainmLAAKZq7H2aiRGXxpepMmtNyA/w400-h216/2023-04-13%2010_10_41-AutoREST%20_%20REST%20_%20Oracle%20Database%20Actions%20%E2%80%93%20Mozilla%20Firefox.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /><div style="text-align: left;">The APEX application has a REST Data Source TestEmployees pointing to that service:</div></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM6N4euySjSvjKLmlsJ15GecuB-DrrM8CnGeGfdwCSuyADJGK24Tj_qvHBflGrlAKCOMvPH94ypq0tZnI_DrpJrmi3B4BWnTgAzUp6M2S9rpqbml0viIFhWgyuIpN1MUpKjHzwG_-c7qRYjKuMPAMX33NQNNrKwaq5RyQo8T3uPZEBAGHsE9zbzw/s980/2023-04-13%2010_17_01-REST%20Data%20Source%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="566" data-original-width="980" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM6N4euySjSvjKLmlsJ15GecuB-DrrM8CnGeGfdwCSuyADJGK24Tj_qvHBflGrlAKCOMvPH94ypq0tZnI_DrpJrmi3B4BWnTgAzUp6M2S9rpqbml0viIFhWgyuIpN1MUpKjHzwG_-c7qRYjKuMPAMX33NQNNrKwaq5RyQo8T3uPZEBAGHsE9zbzw/w400-h231/2023-04-13%2010_17_01-REST%20Data%20Source%20%E2%80%93%20Mozilla%20Firefox.png" width="400" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">The Remote Server attribute contains the IP address and the database connection, in this case the TESTPDB. Click on the pen next to it.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGaqeBZ2CJhQ5NNlToNo83GKhEed0yBQU6kAeabKHHNO1hFduqJHiBwgBqe8qvlxWW4NPBZh48pNAsURZdlhFwBCLZGypalwunfUBLFEkeMR4mOhFUyQksTTARBdrqYir1KR81XpBpJPZeggN4J9xxQqP00jMUw74IFiEhqzggS7CfzysQnWZtNg/s991/2023-04-13%2010_19_08-REST%20Data%20Source%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="732" data-original-width="991" height="295" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGaqeBZ2CJhQ5NNlToNo83GKhEed0yBQU6kAeabKHHNO1hFduqJHiBwgBqe8qvlxWW4NPBZh48pNAsURZdlhFwBCLZGypalwunfUBLFEkeMR4mOhFUyQksTTARBdrqYir1KR81XpBpJPZeggN4J9xxQqP00jMUw74IFiEhqzggS7CfzysQnWZtNg/w400-h295/2023-04-13%2010_19_08-REST%20Data%20Source%20%E2%80%93%20Mozilla%20Firefox.png" width="400" /></a></div>Enable <i>Prompt on Install</i>.<div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Now clone testpdb to clonepdb:</div><div class="separator" style="clear: both; text-align: left;"><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">create</span> pluggable <span style="color: #008800; font-weight: bold;">database</span> clonepdb <span style="color: #008800; font-weight: bold;">from</span> testpdb
file_name_convert <span style="color: #333333;">=</span> (<span style="background-color: #fff0f0;">'/testpdb/'</span>, <span style="background-color: #fff0f0;">'/clonepdb/'</span>);
<span style="color: #008800; font-weight: bold;">alter</span> pluggable <span style="color: #008800; font-weight: bold;">database</span> clonepdb <span style="color: #008800; font-weight: bold;">open</span>;
</pre></div>
<div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">For easier access add clonepdb to tnsnames.ora:</div><div class="separator" style="clear: both; text-align: left;"><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(248, 248, 248); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">cat >> <span style="color: darkgoldenrod;">$TNS_ADMIN</span>/tnsnames.ora <span style="color: #bb4444;"><<EOF</span>
<span style="color: #bb4444;">CLONEPDB =</span>
<span style="color: #bb4444;"> (DESCRIPTION =</span>
<span style="color: #bb4444;"> (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))</span>
<span style="color: #bb4444;"> (CONNECT_DATA =</span>
<span style="color: #bb4444;"> (SERVER = DEDICATED)</span>
<span style="color: #bb4444;"> (SERVICE_NAME = clonepdb)</span>
<span style="color: #bb4444;"> )</span>
<span style="color: #bb4444;"> )</span>
<span style="color: #bb4444;">EOF</span>
tnsping clonepdb
</pre></div>
<div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Stop ORDS, register clonepdb with ORDS interactively or create a password.txt file with your passwords and run:</div><div class="separator" style="clear: both; text-align: left;"><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(248, 248, 248); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">cat > password.txt <span style="color: #bb4444;"><<EOF </span>
<span style="color: #bb4444;"><password></span>
<span style="color: #bb4444;"><password></span>
<span style="color: #bb4444;">EOF</span>
ords install --db-pool clonepdb --db-hostname localhost --db-port 1521 --db-servicename clonepdb --feature-sdw <span style="color: #aa22ff;">true</span> --feature-db-api <span style="color: #aa22ff;">true</span> --feature-rest-enabled-sql <span style="color: #aa22ff;">true</span> --admin-user sys --proxy-user --password-stdin < password.txt
</pre></div>
<div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Restart ORDS and navigate to REST/AutoREST. The service for the employees table also exists in clonepdb ...</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV-Gu8-ov5PLgIek1lgfybDCvViA88h-PFG6R2e2ykgIw0JQhg1TCoz-dL0Pcc01_mO-Aq8R_7uInyCKQNgEVSoBagOZV8qe4RjtHoZwhohVXB5mEJvOtpRHUTMk8kE2cA700Wd89aoDv0B9WXhMzTcl-VHeiy-TjUwKW3YD7ogPAXf8-T1qGJ-Q/s1096/2023-04-13%2010_36_29-AutoREST%20_%20REST%20_%20Oracle%20Database%20Actions%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="536" data-original-width="1096" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV-Gu8-ov5PLgIek1lgfybDCvViA88h-PFG6R2e2ykgIw0JQhg1TCoz-dL0Pcc01_mO-Aq8R_7uInyCKQNgEVSoBagOZV8qe4RjtHoZwhohVXB5mEJvOtpRHUTMk8kE2cA700Wd89aoDv0B9WXhMzTcl-VHeiy-TjUwKW3YD7ogPAXf8-T1qGJ-Q/w400-h195/2023-04-13%2010_36_29-AutoREST%20_%20REST%20_%20Oracle%20Database%20Actions%20%E2%80%93%20Mozilla%20Firefox.png" width="400" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">... and works as expected.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhklnYh2sPVdOH1UFSDn5k-h5B4UCxKUZ_28cPmkO_niASUNghEY0Jdf15EXvdyrl2TVQBzbmdJMU0T2RlynzV8wMvjFpj-cNF2IdGtTNuJHEnG0iHW6E1OIAWLfV68joTqb0JIu8UqsthOXVLbA3UYFueebaMo5rH7qffa_wHcSychWVo1seDgKg/s837/2023-04-13%2010_39_29-http___192.168.56.104_8080_ords_clonepdb_hr_employees_%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="483" data-original-width="837" height="231" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhklnYh2sPVdOH1UFSDn5k-h5B4UCxKUZ_28cPmkO_niASUNghEY0Jdf15EXvdyrl2TVQBzbmdJMU0T2RlynzV8wMvjFpj-cNF2IdGtTNuJHEnG0iHW6E1OIAWLfV68joTqb0JIu8UqsthOXVLbA3UYFueebaMo5rH7qffa_wHcSychWVo1seDgKg/w400-h231/2023-04-13%2010_39_29-http___192.168.56.104_8080_ords_clonepdb_hr_employees_%20%E2%80%93%20Mozilla%20Firefox.png" width="400" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">The APEX application also made it into clonepdb, but of course the TestEmployees REST Data Source still points to testpdb</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPP5WShEM9jn_-IIUyM6H_8whwf61MS7Int-VUVhvWQbxpepQ1ix_O4Daaf0bwU66Xwn7saJ1S4ax_sP0cpqMFpIbvEJBgICuIkdqgWHM_hWpd-rbEyIpsToZazcG1JJuPytVFKOzt5KUNmcG3rdqToUE73LL7FP_FMP3ElM3O_g500tkpsq-lZQ/s1080/2023-04-13%2010_42_03-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="451" data-original-width="1080" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPP5WShEM9jn_-IIUyM6H_8whwf61MS7Int-VUVhvWQbxpepQ1ix_O4Daaf0bwU66Xwn7saJ1S4ax_sP0cpqMFpIbvEJBgICuIkdqgWHM_hWpd-rbEyIpsToZazcG1JJuPytVFKOzt5KUNmcG3rdqToUE73LL7FP_FMP3ElM3O_g500tkpsq-lZQ/w640-h269/2023-04-13%2010_42_03-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;">As the application has been cloned with the PDB, the <i>Prompt on Install</i> attribute does not trigger. We need to ex- and import the application. Export the application from testpdb and make sure that <i>Export with Original IDs</i> is checked</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJgOnYr5brOZ8Oy1qUIQqGABfQcgBP3JP1F-nmWNtNja5P4NPwoayfz_8h290W3DM7RIlzIC1zKegKgENo01UKUqGMNS9RdLllqjoBEJ_mhyGlrNSGKIBZvKqvrxb8erR3qfrOEhpNHOP4Ys2EgUOK9k7yIIo_CK0paPAe_CBY0hPkCg9hiM7x1w/s869/2023-04-13%2010_47_34-Export%20Application%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="453" data-original-width="869" height="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJgOnYr5brOZ8Oy1qUIQqGABfQcgBP3JP1F-nmWNtNja5P4NPwoayfz_8h290W3DM7RIlzIC1zKegKgENo01UKUqGMNS9RdLllqjoBEJ_mhyGlrNSGKIBZvKqvrxb8erR3qfrOEhpNHOP4Ys2EgUOK9k7yIIo_CK0paPAe_CBY0hPkCg9hiM7x1w/w400-h209/2023-04-13%2010_47_34-Export%20Application%20%E2%80%93%20Mozilla%20Firefox.png" width="400" /></a></div>Import the application on clonepdb and check <i>Reuse Application ID 100 From Export File</i> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3itCYOFtUANsD2IVqSrDCiKrHElgNgYSgHAEPWQAAFXoEETZvgzx9KMlci6w7u3M_qcyZMgvumCpR9xyyT4Gq5omYPV_ahdoAEY_M-6xFwGoWOHcsSwI9qRK2n5IPjuX258VNtrnM0sLC8y6iKOQMyVIl6I6JPfA6e6xhGfeGMRX5oUqjDtdXHA/s1283/2023-04-13%2010_50_28-Install%20Application%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="854" data-original-width="1283" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3itCYOFtUANsD2IVqSrDCiKrHElgNgYSgHAEPWQAAFXoEETZvgzx9KMlci6w7u3M_qcyZMgvumCpR9xyyT4Gq5omYPV_ahdoAEY_M-6xFwGoWOHcsSwI9qRK2n5IPjuX258VNtrnM0sLC8y6iKOQMyVIl6I6JPfA6e6xhGfeGMRX5oUqjDtdXHA/w400-h266/2023-04-13%2010_50_28-Install%20Application%20%E2%80%93%20Mozilla%20Firefox.png" width="400" /></a></div>In the last step, the installer prompts for the Base URL of the Remote Server, which has been tagged for Prompt on Install. Change it from testpdb to clonepdb.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8Bp4Kb2xFbkri7AMCcsNOb3xBipTqoPOPLWhfXdv7uNUAQYNLeUWPcVuEbAVBMODUm9P3AHmBZm_xg-xDHuVtSif5jYN6f293lXf8T9YG88KQjx5IEXLOHISzxizGmMS18pBrc1SaRFbOnHzsGn3Et8L4TDK0r1lHrBGNkA9lDnpOYuRoxaOIQ/s1300/2023-04-13%2010_55_29-Install%20Application%20-%20Credentials%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="558" data-original-width="1300" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8Bp4Kb2xFbkri7AMCcsNOb3xBipTqoPOPLWhfXdv7uNUAQYNLeUWPcVuEbAVBMODUm9P3AHmBZm_xg-xDHuVtSif5jYN6f293lXf8T9YG88KQjx5IEXLOHISzxizGmMS18pBrc1SaRFbOnHzsGn3Et8L4TDK0r1lHrBGNkA9lDnpOYuRoxaOIQ/w640-h274/2023-04-13%2010_55_29-Install%20Application%20-%20Credentials%20%E2%80%93%20Mozilla%20Firefox.png" width="640" /></a></div><div>Open the REST Data Source, it now shows the correct local endpoint. </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJttKlzKgVyZ2DP6KQ-GX-zaBJwOl86YVa19G1eTZX_-JSiQpmN0WHqYZo4bzSfHXJBfIeB18w0GeynoeQyZPWNq9_Gx-oPKKdmcZu-5HR2y1NqdFH6OipETWmuxjg4E4zHnekcaeIbd4Qw6Fz2ndkINkMg4rlHhSYqoq4zDttSugQAL7fv2gt_A/s1079/2023-04-13%2010_58_36-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="440" data-original-width="1079" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJttKlzKgVyZ2DP6KQ-GX-zaBJwOl86YVa19G1eTZX_-JSiQpmN0WHqYZo4bzSfHXJBfIeB18w0GeynoeQyZPWNq9_Gx-oPKKdmcZu-5HR2y1NqdFH6OipETWmuxjg4E4zHnekcaeIbd4Qw6Fz2ndkINkMg4rlHhSYqoq4zDttSugQAL7fv2gt_A/w640-h260/2023-04-13%2010_58_36-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" width="640" /></a></div>But for automatic deployment of developer environments, we need to get rid of the interactive step. Before we can import the export file by running it in SQLcl, we need to set the override with <a href="https://docs.oracle.com/en/database/oracle/apex/22.2/aeapi/SET_REMOTE_SERVER-Procedure.html#GUID-B71B95DF-2362-4E79-9E95-F4CE68D95ACA">APEX_APPLICATION_INSTALL.SET_REMOTE_SERVER</a> .<br /><div><br />
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #0000aa;">declare</span>
l_base_url varchar2(<span style="color: #009999;">255</span>);
<span style="color: #0000aa;">begin</span>
apex_application_install<span style="color: #009999;">.</span>set_remote_server(
p_static_id => <span style="color: #aa5500;">'192_168_56_104_ords_testpdb'</span>,
p_base_url => <span style="color: #aa5500;">'http://192.168.56.104:8080/ords/clonepdb/'</span>);
l_base_url := apex_application_install<span style="color: #009999;">.</span>get_remote_server_base_url(<span style="color: #aa5500;">'192_168_56_104_ords_testpdb'</span>);
DBMS_OUTPUT<span style="color: #009999;">.</span>PUT_LINE(<span style="color: #aa5500;">'Base URL for '</span> || <span style="color: #aa5500;">'192_168_56_104_ords_testpdb'</span> || <span style="color: #aa5500;">' is now '</span> || l_base_url);
<span style="color: #0000aa;">end</span>;
/
</pre></div>
<div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">That should give</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHL8T98QlXm3aCgzVLz5vmc2MUgQL0Zdppx9emV3RJNgbI05tDWrD8wjPYDyt0hIOlxTf9eUBsLMYQqXBswCpzXTyhfuqJzdmVYTudcsKaKuN1ckEChxZ8m0EEdCE74QLauNPDIWImD_GpyssInj6_TYFZ9G3ERl9Rz9nRY-h-49kAqjEO6PcY6Q/s1000/2023-04-13%2012_32_27-21-Apex%20(testpdb)%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="310" data-original-width="1000" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHL8T98QlXm3aCgzVLz5vmc2MUgQL0Zdppx9emV3RJNgbI05tDWrD8wjPYDyt0hIOlxTf9eUBsLMYQqXBswCpzXTyhfuqJzdmVYTudcsKaKuN1ckEChxZ8m0EEdCE74QLauNPDIWImD_GpyssInj6_TYFZ9G3ERl9Rz9nRY-h-49kAqjEO6PcY6Q/w640-h198/2023-04-13%2012_32_27-21-Apex%20(testpdb)%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div>And opening the REST Data Source in the APEX application on clonepdb should show the URL pointing to clonepdb.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjghBQZqeXIomcXt9QoxzhptMkn230lI27SwUH0la5raPHDjBAP8yWHr-zo3Bg0Pm2wdzqgqNoFLS_mlS7_OP-i4EKdr-sLmuWA9Qn9vrvl9iIbWS0IDwLVI0EBHK2SeFgZSdZPVbqpWPu0i82jm6i0hoyv_v1Qenlv5g2T55drx3xyxslikGhgUQ/s1080/2023-04-13%2012_35_53-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="439" data-original-width="1080" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjghBQZqeXIomcXt9QoxzhptMkn230lI27SwUH0la5raPHDjBAP8yWHr-zo3Bg0Pm2wdzqgqNoFLS_mlS7_OP-i4EKdr-sLmuWA9Qn9vrvl9iIbWS0IDwLVI0EBHK2SeFgZSdZPVbqpWPu0i82jm6i0hoyv_v1Qenlv5g2T55drx3xyxslikGhgUQ/w640-h260/2023-04-13%2012_35_53-REST%20Data%20Sources%20%E2%80%93%20Mozilla%20Firefox.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">So all that is needed after cloning the database with the APEX application and the REST service is running a script with apex_application_install<span style="color: #009999;">.</span>set_remote_server and re-importing the application.</div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-39844353681943001542023-02-03T04:39:00.005-08:002023-02-03T04:41:41.878-08:00The Oracle DB Developer VM: Installing VSCodium and the Oracle Developer Tools<div dir="ltr" style="text-align: left;" trbidi="on">
This post is part of my <a href="https://arnes-stuff.blogspot.com/2020/05/the-oracle-database-developer-vm-project.html">Oracle DB Developers VM</a> series. Based on the previous postings on how to set up Oracle Linux 8 with the Oracle DB on VirtualBox, this post will show how to install VSCodium with the Oracle integration in this environment on a beginners level.<br />
Gnome, in contrast to KDE, does not come with a good visual editor for developers, so we should install something better. VS Code has gained popularity and Oracle plugins are available, but VSCodium is the better choice because it <a href="https://vscodium.com/#why" target="_blank">does not contain telemetry/tracking</a>. And according to <a href="https://www.thatjeffsmith.com/archive/2022/10/whats-next-for-oracle-sql-developer-a-quick-sneek-peek/" target="_blank">this post</a>, getting familiar with VSCodium is a good idea for Oracle developers anyways. <br />For installing VSCodium, just follow the <a href="https://vscodium.com/#install">official instructions</a>:</div><div dir="ltr" style="text-align: left;" trbidi="on"><br />
<!--HTML generated using hilite.me--><div style="background: rgb(248, 248, 248); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
<span style="color: green;">printf</span> <span style="color: #ba2121;">"[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h"</span> | sudo tee -a /etc/yum.repos.d/vscodium.repo
sudo dnf install codium
sudo dnf install dotnet-sdk-2.1
</pre></div>
<br />
We also need to install the <a href="https://www.oracle.com/database/technologies/appdev/dotnet/install-dotnetcore-linux.html">.NET Core Runtime for Linux</a> to run the Oracle Developer Tools for VS Code. It is important to use the older version 2.1.<br />
<!--HTML generated using hilite.me-->Double check the dotnet installation with<br />
<br />
<div style="background: rgb(248, 248, 248); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;">dotnet --list-sdks
dotnet --list-runtimes
</pre>
</div>
<br />
That should return something like:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGJK2Ep-MFcFwFVTguOsq2sjvmBN9GGhX3pQvc3t7AFPk4bnhkZaUwmP3kvqxvngro__2zvHEDmuXaQrgMeqHQa2cBVEu4KxVRuUtVcQ8JnWvgIFBqUPNZhi0t0anp7FebSYMJ7wgD2g/s1600/2020-08-27+12_45_48-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="92" data-original-width="700" height="84" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGJK2Ep-MFcFwFVTguOsq2sjvmBN9GGhX3pQvc3t7AFPk4bnhkZaUwmP3kvqxvngro__2zvHEDmuXaQrgMeqHQa2cBVEu4KxVRuUtVcQ8JnWvgIFBqUPNZhi0t0anp7FebSYMJ7wgD2g/s640/2020-08-27+12_45_48-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Searching for Code should now show you VS Code in your activities<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKkotvCV5XqYmvXQd1hMU1mu9IdDd7NFvukwDn3aRe17xl0tcUmdSMOu5kUWs7VF_AYfKxVd0CrJuntPGUnLprnavdvt1nOruGFzkYbIqWB4CqfSaao2j4L7ph5sp8xnnCVvePslXI_siyxtcv0OtrRfIdh6_IN9uJZju1rJn3kWdAMnhNa9K-kw/s403/2023-02-03%2012_51_51-Window.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="256" data-original-width="403" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKkotvCV5XqYmvXQd1hMU1mu9IdDd7NFvukwDn3aRe17xl0tcUmdSMOu5kUWs7VF_AYfKxVd0CrJuntPGUnLprnavdvt1nOruGFzkYbIqWB4CqfSaao2j4L7ph5sp8xnnCVvePslXI_siyxtcv0OtrRfIdh6_IN9uJZju1rJn3kWdAMnhNa9K-kw/s320/2023-02-03%2012_51_51-Window.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Moving the icon to the right into the favorites bar makes it also available in the applications menu.</div><div dir="ltr" style="text-align: left;" trbidi="on"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvXfRTGwfs7Us7Fjk3SIvRQcIm9xN6olSzLkgNJwuiF2KrTnfbQJH3MNokovCGRVCN16FI7-Xd1pHM5A7thRtgsOHw_Aa0unZitwNJExr6_OkIkTG_cYL7Y47g9AUM1v258BpXf8z91XRX_0NspAtbLIX1psjey8cU47X-xpqr6vB1y_qf--1jkA/s536/2023-02-03%2012_54_32-Window.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="498" data-original-width="536" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvXfRTGwfs7Us7Fjk3SIvRQcIm9xN6olSzLkgNJwuiF2KrTnfbQJH3MNokovCGRVCN16FI7-Xd1pHM5A7thRtgsOHw_Aa0unZitwNJExr6_OkIkTG_cYL7Y47g9AUM1v258BpXf8z91XRX_0NspAtbLIX1psjey8cU47X-xpqr6vB1y_qf--1jkA/s320/2023-02-03%2012_54_32-Window.png" width="320" /></a></div>
Start VSCodium, go to the extensions tab and search for Oracle.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOtCos8A_BUKvjzOHQXml5HWCrU8x4wPyc68ifrxhbJuEx806tF2Ll_qJhg_F6Wmk0uk2opGI-HqPs6d7s7zFxzz6146WwldvtGLN-WVzNv2_IZepN-hmA7-0Rn9pmdAInuJ6gy1f3Gg/s1600/2020-08-27+12_01_28-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="386" data-original-width="1079" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOtCos8A_BUKvjzOHQXml5HWCrU8x4wPyc68ifrxhbJuEx806tF2Ll_qJhg_F6Wmk0uk2opGI-HqPs6d7s7zFxzz6146WwldvtGLN-WVzNv2_IZepN-hmA7-0Rn9pmdAInuJ6gy1f3Gg/s640/2020-08-27+12_01_28-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
Choose the official one from Oracle Corporation and click on <i>Install</i>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS1Ml5T3L-yPfO7XFQ9qEqEuvQSSziLi3dI301eIb0meeOcmLrp734LAqKD-i0JdKy_BIt6VbXWmiaIPkwPMrV2HCxhtjBnvn1Celz-3M4UOuRfiJOq0aIABfv6tkneSo3ODgLSe18cA/s1600/2020-08-27+13_00_56-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="582" data-original-width="839" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS1Ml5T3L-yPfO7XFQ9qEqEuvQSSziLi3dI301eIb0meeOcmLrp734LAqKD-i0JdKy_BIt6VbXWmiaIPkwPMrV2HCxhtjBnvn1Celz-3M4UOuRfiJOq0aIABfv6tkneSo3ODgLSe18cA/s400/2020-08-27+13_00_56-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
After installation of the extension, on the left bar an Oracle DB tab will appear. Click it and in the Oracle Explorer click the plus (+) and insert your credentials.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwgt3cRiJvHcNIgQooqO8D3lsQFry-0U2bSq70BWqvBKd5GtoI2vMIu-8RtEW8OqFwWiGZTyGfV0B8ALJrEb9J-gr3rQtipb8NhP54PFpw60AQ8T6xa2zLar-YdDpmP8Wca07eJhK44Q/s1600/2020-08-27+13_04_48-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="315" data-original-width="1071" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwgt3cRiJvHcNIgQooqO8D3lsQFry-0U2bSq70BWqvBKd5GtoI2vMIu-8RtEW8OqFwWiGZTyGfV0B8ALJrEb9J-gr3rQtipb8NhP54PFpw60AQ8T6xa2zLar-YdDpmP8Wca07eJhK44Q/s640/2020-08-27+13_04_48-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
Double click the newly created connection. Click around, for example choose a table and select <i>Show Data</i>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-WQEqbV3T0FOcMNvI4AvGWjXSpOdlZM-iuhQcjU1I0VmqGqraT_jo_vWOGfyb-UPRC10IjMysBxGN8M_yRyx541dLiTP5GVpNemtRUQJ-owHHL7oUU7NIjGR2LEndja46vzthdkUTg/s1600/2020-08-27+13_09_41-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="255" data-original-width="929" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-WQEqbV3T0FOcMNvI4AvGWjXSpOdlZM-iuhQcjU1I0VmqGqraT_jo_vWOGfyb-UPRC10IjMysBxGN8M_yRyx541dLiTP5GVpNemtRUQJ-owHHL7oUU7NIjGR2LEndja46vzthdkUTg/s640/2020-08-27+13_09_41-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
Editing stored procedures and functions also works.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLum7dDIMMvMTop39kN-avcDs92GO89VkemXk0ja9mO60xlqf23joUJkZ55cXNxF9ybMfB7aROqZQw5MgG4YE3_muzaDjxr9lsnjLjZL934BuRjrsy_lL7yHAKBY2ufKbP5JsQtROZKA/s1600/2020-08-27+13_15_09-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="391" data-original-width="660" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLum7dDIMMvMTop39kN-avcDs92GO89VkemXk0ja9mO60xlqf23joUJkZ55cXNxF9ybMfB7aROqZQw5MgG4YE3_muzaDjxr9lsnjLjZL934BuRjrsy_lL7yHAKBY2ufKbP5JsQtROZKA/s400/2020-08-27+13_15_09-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
To execute some SQL press F1 and choose Oracle: Develop New SQL or PL/SQL<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqJm-xeMm82EwzRRMgUfSM0f4USzzNLDE9y8YesFY_JZorcm_D_1owUjIlReNwKCz2YmeXBcOhX2uDpTMOp-X28ZwWRqeNwVDokWUgomzLHJWCz0cy8JwHAa3IRkWIHOZ7Isrm8NBEpQ/s1600/2020-08-27+13_17_28-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="107" data-original-width="619" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqJm-xeMm82EwzRRMgUfSM0f4USzzNLDE9y8YesFY_JZorcm_D_1owUjIlReNwKCz2YmeXBcOhX2uDpTMOp-X28ZwWRqeNwVDokWUgomzLHJWCz0cy8JwHAa3IRkWIHOZ7Isrm8NBEpQ/s400/2020-08-27+13_17_28-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
Select your connection<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcxIXnbL6Yglzi-_cPr6lwXSC6C55nSw_i3QnnjwpGacS8p-CNdSJWuecdvOSpoyqKhsdx8r0XrPUb8HkIEsFZLKifq9xLoycCNrCc9s3Z93cLFNHzswETL5iy-8A84QWVGeuzKHxrqg/s1600/2020-08-27+13_20_15-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="314" data-original-width="628" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcxIXnbL6Yglzi-_cPr6lwXSC6C55nSw_i3QnnjwpGacS8p-CNdSJWuecdvOSpoyqKhsdx8r0XrPUb8HkIEsFZLKifq9xLoycCNrCc9s3Z93cLFNHzswETL5iy-8A84QWVGeuzKHxrqg/s400/2020-08-27+13_20_15-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Type some meaningfull SQL and execute it<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs5CKGsGe3MLmbCNiRKjWwHvkiE67eC_AGhwHBULEN9TJZ3GkKI7_YiZAuaB1k0PHQL_Nbxg4xRpEWGY4pvE-962Cb69kuSfFgsk2t3WpPJ0j8Tt4MYOHat26B_1gVsaTXGBN_B-BSkw/s1600/2020-08-27+13_22_50-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="856" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs5CKGsGe3MLmbCNiRKjWwHvkiE67eC_AGhwHBULEN9TJZ3GkKI7_YiZAuaB1k0PHQL_Nbxg4xRpEWGY4pvE-962Cb69kuSfFgsk2t3WpPJ0j8Tt4MYOHat26B_1gVsaTXGBN_B-BSkw/s400/2020-08-27+13_22_50-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
That should give you the result set.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvaqIQVSsX0BOjMfb7PAYOfiJBP9pM9C46vhzuqOdo8aDzDUo3rcNWagfx8CFjeLXLrZBcyAJGYcIBl6zePDbbrpJBBTyCJIrINmE8qUBGBmlXyqIfmxVZe-mCIMS0CzdUTZc7Q5OmRA/s1600/2020-08-27+13_27_59-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="447" data-original-width="834" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvaqIQVSsX0BOjMfb7PAYOfiJBP9pM9C46vhzuqOdo8aDzDUo3rcNWagfx8CFjeLXLrZBcyAJGYcIBl6zePDbbrpJBBTyCJIrINmE8qUBGBmlXyqIfmxVZe-mCIMS0CzdUTZc7Q5OmRA/s400/2020-08-27+13_27_59-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
By choosing View->Editor Layout->Two Rows and moving the results tab into the lower part of the SQL tab, both can be displayed on one page. Of course, code completion also works.<br />
<br />
Of course, all of this works also if you install VSCodium on your host OS. On Windows, just download and run the installer. The required .dotnet libraries are already part of the OS.<br />
<br />
So much for the first steps with VSCodium and the Oracle extension. More information can be found on the <a href="https://www.oracle.com/database/technologies/appdev/dotnet/odtvscodequickstart.html">official Oracle page</a>.</div>
Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-68634592385689744102022-12-20T04:11:00.001-08:002023-04-24T07:35:35.143-07:00Use sqlcl with Oracle Linux 9 in Windows Terminal on Windows Subsystem for Linux<p>This post shows a quick and easy way to use Linux commands on Windows in the Windows Terminal by using Windows Subsystem for Linux (WSL). Oracle Developers can - for example - use sqlcl from that environment.</p><p>First, install Windows Terminal from the Microsoft Store, or with winget if you have already <a href="https://learn.microsoft.com/en-us/windows/package-manager/winget/" rel="nofollow" target="_blank">installed</a> it.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBZDS2Bc3BLtAJxC2Pf5xSnbuZEnx8XbeMoFL4j_CalmvMbNB1XK9x8KCldVXSimLH7G6s3hYXM_V0mi2HPVETtQQpQOlm4KGyD4aE75ZZz-kkgB5fpmueAs68_t8-48mx1EruoEiu8FE_B9Ma8gUGcY1rddmZkXCbcZ9hn4l8YtK0VlMH48M-VA/s715/2022-12-20%2012_16_56-Post_%20Edit%20-%20Vivaldi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="118" data-original-width="715" height="66" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBZDS2Bc3BLtAJxC2Pf5xSnbuZEnx8XbeMoFL4j_CalmvMbNB1XK9x8KCldVXSimLH7G6s3hYXM_V0mi2HPVETtQQpQOlm4KGyD4aE75ZZz-kkgB5fpmueAs68_t8-48mx1EruoEiu8FE_B9Ma8gUGcY1rddmZkXCbcZ9hn4l8YtK0VlMH48M-VA/w400-h66/2022-12-20%2012_16_56-Post_%20Edit%20-%20Vivaldi.png" width="400" /></a></div><p>Windows Subsystem for Linux is a great way to have Linux functionality on Windows. For the first time usage, follow the Microsoft <a href="https://docs.microsoft.com/en-us/windows/wsl/install" style="outline-width: 0px !important; user-select: auto !important;" target="_blank">Documentation</a> to install it. Oracle Linux 9 is available in the Microsoft Store as fully compatible, free RHEL/CentOS alternatives. That is a nice option, if you have to develop for RHEL, but want to save the license costs. </p><p>And SQLcl can easily installed, as long as you have Java on the system.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikAragSj0uZSMLBJ6LEfjmKHbjzV-t8v-9sPT5hmuQAdFtqhu86_3dD_QyECjeV5y1vV_CeqIP5B35HoYSCgz4BJMdA3R7fmhJ5z9x-r1n5Z84RYDFVgFd1IJ1fpOHc7IQL0mwulUUXYWwDIFEgguMFL50VYFaPPQkzrYgyVRZXJkpuXJFa4ar8w/s1194/2022-12-20%2011_27_36-Microsoft%20Store.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="831" data-original-width="1194" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikAragSj0uZSMLBJ6LEfjmKHbjzV-t8v-9sPT5hmuQAdFtqhu86_3dD_QyECjeV5y1vV_CeqIP5B35HoYSCgz4BJMdA3R7fmhJ5z9x-r1n5Z84RYDFVgFd1IJ1fpOHc7IQL0mwulUUXYWwDIFEgguMFL50VYFaPPQkzrYgyVRZXJkpuXJFa4ar8w/w400-h279/2022-12-20%2011_27_36-Microsoft%20Store.png" width="400" /></a></div><div>Download Oracle Linux 9 from the Microsoft Store or use winget:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">winget search <span style="color: #a31515;">'oracle linux'</span>
winget install 9MXQ65HLMC27
</pre></div>
<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_WbfYFCgMnnh9EE0VbN-FqMF4pMPwiwByRcOvspDM0pTVm1ms63zt6OZ7_nFIK29izeRNk4ubdU2hmGhVFAkNhEhtlCH_uEyupPam32I3nrBYQc3YhoZPjTd8wa4xJHDkK4XinZ14BQg4uOOBN7ihztpkWafc0KbIXeqwoPm-D5xVG2tfOC2tsQ/s424/2022-12-20%2011_28_10-Microsoft%20Store.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="161" data-original-width="424" height="122" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_WbfYFCgMnnh9EE0VbN-FqMF4pMPwiwByRcOvspDM0pTVm1ms63zt6OZ7_nFIK29izeRNk4ubdU2hmGhVFAkNhEhtlCH_uEyupPam32I3nrBYQc3YhoZPjTd8wa4xJHDkK4XinZ14BQg4uOOBN7ihztpkWafc0KbIXeqwoPm-D5xVG2tfOC2tsQ/s320/2022-12-20%2011_28_10-Microsoft%20Store.png" width="320" /></a></div><div>It installed within minutes and can immediately be used. A nice thing about Windows Terminal with WSL is, that WSL automatically registers with Windows Terminal as an option.</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSBuuNu75iy4pM46UgsJJzu2J-4AEYY7uNinP4HskjO6dXCjjkvyAyJxYJ5toyjSXva7EmcOwsaBPn3TYOd4zO7Wn0uBCOA6wVOxe4AfkO9WylFt-Yd4bGvM-qZz-8F7snJ5ggZOPCgS1_rc1JC7LslNtW6eCD_xY2cbPockB64rWo0W5cdxgCuA/s616/2022-12-20%2012_21_20-Post_%20Edit%20-%20Vivaldi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="288" data-original-width="616" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSBuuNu75iy4pM46UgsJJzu2J-4AEYY7uNinP4HskjO6dXCjjkvyAyJxYJ5toyjSXva7EmcOwsaBPn3TYOd4zO7Wn0uBCOA6wVOxe4AfkO9WylFt-Yd4bGvM-qZz-8F7snJ5ggZOPCgS1_rc1JC7LslNtW6eCD_xY2cbPockB64rWo0W5cdxgCuA/s320/2022-12-20%2012_21_20-Post_%20Edit%20-%20Vivaldi.png" width="320" /></a></div></div><div>If, for whatever reason, the Oracle Linux 9 option does not show up, try the following. Open Windows Terminal settings, choose <i>Add a new profile</i>, select OracleLinux_9 from the select list and click on Duplicate.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0GZnOlBxILc25m7kqYb88BM_jZbMxTvTtkMojKLi3oQuiB4XRbSIG1BxTepIzMvg4HY1_V801UtcO514w8DCnimnknTspUJ0imkJ4tvg463lW8vyi_qcQo8sg9ujLwA9l4qKOvCU6Q52N5IPzI7e1c9VLTJMr1mXzr7AmAgOrg9MEMN8e0AcUdA/s1043/2022-12-20%2012_25_46-Settings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="664" data-original-width="1043" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0GZnOlBxILc25m7kqYb88BM_jZbMxTvTtkMojKLi3oQuiB4XRbSIG1BxTepIzMvg4HY1_V801UtcO514w8DCnimnknTspUJ0imkJ4tvg463lW8vyi_qcQo8sg9ujLwA9l4qKOvCU6Q52N5IPzI7e1c9VLTJMr1mXzr7AmAgOrg9MEMN8e0AcUdA/s320/2022-12-20%2012_25_46-Settings.png" width="320" /></a></div><div>Open an Oracle Linux 9 tab and first install all updates via sudo dnf update. <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnqP0wbRgm3XP9JJjLHnj6DpfyAr2bNiXPy2yn3YiVEzvd4rIz7rvBwEThmD3sHGMe_q3kGjxLjHZ5_d15rhiJuOE45K1Kvwjypg8LicBQAL-fYHM8YRxlzgk2e8ceD7TXwMXpK1sKzcDNWQkEBoxPsXrOh5ALu-0UhQFtqDT0zDrKEYohL63qNw/s1105/2022-12-20%2011_17_44-.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="228" data-original-width="1105" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnqP0wbRgm3XP9JJjLHnj6DpfyAr2bNiXPy2yn3YiVEzvd4rIz7rvBwEThmD3sHGMe_q3kGjxLjHZ5_d15rhiJuOE45K1Kvwjypg8LicBQAL-fYHM8YRxlzgk2e8ceD7TXwMXpK1sKzcDNWQkEBoxPsXrOh5ALu-0UhQFtqDT0zDrKEYohL63qNw/w640-h133/2022-12-20%2011_17_44-.png" width="640" /></a></div>...<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh998Ujar7C_jYxCmFkzni2K-K9tneB-t6vu2miybLNW-87l1peVEUhzWIvgyKZlVySgVzOpat72TdTLj8ZBOQPKqKxwmvpger9WalAu9nfGM_JNm_aqs8oj1C48M23ESWQDZ4cxb3kP4_wzVU8GBjlA0I5Wb1uh7r5iAoR6-0DBp8NHZfO-XCyfg/s1080/2022-12-20%2011_18_16-.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="196" data-original-width="1080" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh998Ujar7C_jYxCmFkzni2K-K9tneB-t6vu2miybLNW-87l1peVEUhzWIvgyKZlVySgVzOpat72TdTLj8ZBOQPKqKxwmvpger9WalAu9nfGM_JNm_aqs8oj1C48M23ESWQDZ4cxb3kP4_wzVU8GBjlA0I5Wb1uh7r5iAoR6-0DBp8NHZfO-XCyfg/w640-h116/2022-12-20%2011_18_16-.png" width="640" /></a></div><div><div><br /></div><div>For SQLcl install Java. As this is a minimal installation, unzip and ncurses are missing so also install them.<br /><div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sudo dnf in java-17-openjdk.x86_64
</pre><pre style="line-height: 125%; margin: 0px;">sudo dnf in ncurses</pre><pre style="line-height: 125%; margin: 0px;">sudo dnf in unzip.x86_64</pre></div><p>Download latest SQLcl zip archive from https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip and unzip it</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip
unzip sqlcl-latest.zip</pre></div><p>Add the path to the SQLcl binary to your .bashrc and source it. A cool feature of WLS is, that all your Windows drives are automatically mounted under /mnt/c, /mnt/d etc. So if you already have a network/admin directory under Windows, you can point your TNS_ADMIN to that location. Also set SQLPATH to enable some of the cool features of SQLcl. This is what my .bashrc ends with.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #003388;">export </span><span style="color: #336699;">PATH</span>=/home/oracle/sqlcl/bin:<span style="color: #336699;">$PATH</span>
<span style="color: #003388;">export </span><span style="color: #336699;">TNS_ADMIN</span>=/mnt/d/Oracle/network/admin
</pre><pre style="line-height: 125%; margin: 0px;"><span style="color: #003388;">export </span>SQLPATH=~/sql</pre></div>
<p>Create a directory ~/sql and inside a file named login.sql with the above content.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">set statusbar on
set highlighting on
</pre></div>
<p> That't it. Open an Oracle Linux 9 tab in your Windows Terminal and connect to all your databases via sqlcl</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW5pAZvPMcVd2mfmRfJ-1szA9Z0U1Iqygcbl5Ball6awR1ZySMAC7lepxVJDR23I8Ir94cmuC9W3-EB0o5rgcX_494bXMU7JdfPtaBLvhYiPnSr1YC_9Ezg-wp7Urdi8__vH_snUd1ugcukmRAeBpdGRMml8L3v1D-DlbUGq5gwfIPrAQKF1O9Rw/s689/2022-12-20%2013_05_01-Double%20Commander%201.0.9~222.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="466" data-original-width="689" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW5pAZvPMcVd2mfmRfJ-1szA9Z0U1Iqygcbl5Ball6awR1ZySMAC7lepxVJDR23I8Ir94cmuC9W3-EB0o5rgcX_494bXMU7JdfPtaBLvhYiPnSr1YC_9Ezg-wp7Urdi8__vH_snUd1ugcukmRAeBpdGRMml8L3v1D-DlbUGq5gwfIPrAQKF1O9Rw/w400-h270/2022-12-20%2013_05_01-Double%20Commander%201.0.9~222.png" width="400" /></a></div><p>Or just take it to use all usual Linux commands in Windows.</p></div></div></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-61951186555730776482022-12-16T06:08:00.004-08:002022-12-16T07:22:04.435-08:00The Database Developer VM: installing Apex 22.2 and ORDS 22.4<p>This post is part of my <a href="https://arnes-stuff.blogspot.com/2020/05/the-oracle-database-developer-vm-project.html">Oracle Developer VM Project</a> series. It is not meant to replace the official documentation in any way and what I describe is no recommended configuration. It is only meant to be a guide, if you follow my DB Developer VM Project and want to add these services to your VM.</p>
<b>Part 1: Install Apex</b><p>According to the <a href="https://docs.oracle.com/en/database/oracle/apex/22.2/htmig/apex-installation-requirements.html#GUID-13DE5DEE-DA14-491F-B0A4-39B7FB8413D0" target="_blank">documentation</a>, memory_target needs to be set to at least 300M for Apex, but in my setup the database won't start with this amount of memory. I get the following error:</p><p><span style="font-family: courier;">ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 6304M</span></p><p>So first, we will set that parameter to the required value (or higher, if you need it).</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">system</span> <span style="color: #008800; font-weight: bold;">set</span> memory_target<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'6304M'</span> <span style="color: #008800; font-weight: bold;">scope</span><span style="color: #333333;">=</span>spfile;
startup <span style="color: #008800; font-weight: bold;">force</span>;
</pre></td></tr></tbody></table></div>
<div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">If the database won't start up because you run into a <span style="font-family: courier;">ORA-00845: MEMORY_TARGET not supported on this system</span> then your shared memory (/dev/shm) is configured too low. Checking with <span style="font-family: courier;">df -h</span> will show a value smaller than 6.304 MB. To solve this, run</div><div class="separator" style="clear: both; text-align: left;"><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">mount -t tmpfs shmfs -o size=10G /dev/shm
</pre></div>
<div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">and startup the database again.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">This should give you the following: </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTwcX2_-74NkkqxrkLbYX7oOSjCMJS_tX4H5cHGkuVcjSGVvP7zA0uoTdXmjjhJT-qfQm1bOii9wzbNf-YUA7RLNz8gGxH86T2UPavEpUZBV8lXOKR2WP4-Z9mwgDDTSSByKctW4Y9aA/s623/2021-02-02+14_53_56-OL8+DBDev+%2528Vor+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="403" data-original-width="623" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTwcX2_-74NkkqxrkLbYX7oOSjCMJS_tX4H5cHGkuVcjSGVvP7zA0uoTdXmjjhJT-qfQm1bOii9wzbNf-YUA7RLNz8gGxH86T2UPavEpUZBV8lXOKR2WP4-Z9mwgDDTSSByKctW4Y9aA/s320/2021-02-02+14_53_56-OL8+DBDev+%2528Vor+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div>
<span style="text-align: left;">Download the </span><a href="https://www.oracle.com/tools/downloads/apex-downloads.html" style="text-align: left;" target="_blank">Apex install bundle</a><span style="text-align: left;"> and unzip it (eg. to /u01), which creates an apex folder. In the unpacked folder run the installer</span><div><br /><!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sqlplus sys/your_password@orclpdb as sysdba @apexins sysaux sysaux temp /i/
</pre></div><div><br /></div><div>Leave the session open and create the Apex Admin user by running <span style="font-family: courier;">@apxchpwd.sql</span>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ4djHJdEpjDigY_ATylNeg4Ocd2nTdasuDOcbOZEq_zAVZG3qJ2iY0gzEZatOTJkzHNJVPscVl8zmv3YuUNJ1Qsxcteejl2OkY3sD65XeDW1QVGQ-4n0l8t6yaKPr8Knv7IDaKk7P9A/s741/2021-02-02+16_01_21-OL8+DBDev+%2528Vor+Apex+Admin%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="257" data-original-width="741" height="139" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ4djHJdEpjDigY_ATylNeg4Ocd2nTdasuDOcbOZEq_zAVZG3qJ2iY0gzEZatOTJkzHNJVPscVl8zmv3YuUNJ1Qsxcteejl2OkY3sD65XeDW1QVGQ-4n0l8t6yaKPr8Knv7IDaKk7P9A/w400-h139/2021-02-02+16_01_21-OL8+DBDev+%2528Vor+Apex+Admin%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div>Unlock the APEX_PUBLIC_USER and change his password, which has been randomly set at installation</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #007020; font-weight: bold;">alter</span> <span style="color: #007020; font-weight: bold;">user</span> apex_public_user identified <span style="color: #007020; font-weight: bold;">by</span> oracle account unlock;
</pre></div>
<div><br /></div><div>Still in the same session, run <span style="font-family: courier;">@apex_rest_config.sql</span> and set both passwords for the APEX_LISTENER user and the APEX_REST_PUBLIC_USER user.</div><div><br /></div><div>To use web services and for sending email, network services need to be enabled. Copy the following from the <a href="https://docs.oracle.com/en/database/oracle/apex/22.2/htmig/enabling-network-services-in-oracle-db11g-or-later.html#GUID-CA19B8DF-B210-46FC-BC3A-F0DC76AE5625" target="_blank">documentation</a> and run it:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3
4
5
6
7</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #007020; font-weight: bold;">BEGIN</span>
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
<span style="color: #007020; font-weight: bold;">host</span> <span style="color: #666666;">=></span> <span style="color: #4070a0;">'*'</span>,
ace <span style="color: #666666;">=></span> xs<span style="border: 1px solid rgb(255, 0, 0);">$</span>ace_type(privilege_list <span style="color: #666666;">=></span> xs<span style="border: 1px solid rgb(255, 0, 0);">$</span>name_list(<span style="color: #4070a0;">'connect'</span>),
principal_name <span style="color: #666666;">=></span> <span style="color: #4070a0;">'APEX_220200'</span>,
principal_type <span style="color: #666666;">=></span> xs_acl.ptype_db));
<span style="color: #007020; font-weight: bold;">END</span>;
</pre></td></tr></tbody></table></div>
<div><br /></div><div><b>Part 2: Install ORDS</b></div><div>
<p>First, we need to make some settings. Add the following to .bashrc and source it.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">export _JAVA_OPTIONS="-Xms3000M -Xmx3000M"
export ORDS_CONFIG=/u01/ords-config
export ORDS_HOME=/u01/ords-22-4
export PATH=$ORDS_HOME/bin:$PATH</pre></div><div><br /></div>
Create both directories:</div><div><br />
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">mkdir /u01/ords-22-4
mkdir /u01/ords-config</pre></div></div><div><br /></div><div><div>Download the latest ORDS from <a href="https://download.oracle.com/otn_software/java/ords/ords-latest.zip">https://download.oracle.com/otn_software/java/ords/ords-latest.zip</a> and unzip the contents to your target directory (eg. /u01/). Optional rename the ords directory from the archive and add the ORDS version number, eg. ords-22-4 (and reflect that in the $ORDS_HOME variable in .bashrc). This makes it easier to switch versions when neccesary.</div><div>As $PATH and $ORDS_CONFIG are already set, from anywhere run</div></div><div>
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">ords install --interactive
</pre></div>
</div><div><br /></div><div>ORDS will ask for some configuration parameters. In most cases, you can just accept the defaults.</div><div>If you have followed my guide so far, the only parameters, that need to be set, are:</div><div><ul style="text-align: left;"><li>Enter the database service name [orcl]: orclpdb</li><li>Provide database username with administrator privileges: sys (and your password)</li><li>Enter the APEX static resources location:/u01/apex/images/</li></ul></div><div>After the setup, ORDS will keep running in standalone mode. We are not done yet, but give it a try to check if everything went fine so far. Wait until the ORDS has completely started: </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFrmjECpUOAQUxEUaJqEZB9kREeGEM-n7mA6Hmzoc0S29msaiBePmEH6lqlK4I_aK_J6ZFhsnEmuNPVGL1S84DK0-_d95iGQa9xltAXx6v3CZNT1vD5mNvP84MpgeeQIKlgeSBIPl_LkYjBOyhsg0TknaVy0TfmYgVyYc-mAG7B4fkuE3K71qc6A/s957/ORDS%20Started.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="128" data-original-width="957" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFrmjECpUOAQUxEUaJqEZB9kREeGEM-n7mA6Hmzoc0S29msaiBePmEH6lqlK4I_aK_J6ZFhsnEmuNPVGL1S84DK0-_d95iGQa9xltAXx6v3CZNT1vD5mNvP84MpgeeQIKlgeSBIPl_LkYjBOyhsg0TknaVy0TfmYgVyYc-mAG7B4fkuE3K71qc6A/w640-h86/ORDS%20Started.png" width="640" /></a></div><div>Open Firefox and enter <a href="http://localhost:8080/ords">http://localhost:8080/ords</a>, that should give you the Apex login page (as this is the first call, it will take a few seconds).</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpTPB1N4iN3AW8ISJKCfvE_4RGfUGcugCx7elE3IsBaH53unhK8rX2qt4ZbvQTj__q02UAkTS3nLJLRNbm1HrsZgVgazFGEf5idW_0hw55Yj1yYBY_K-u2xyBfNQQOvr_d-3zp3Pt1NQ/s833/2021-02-02+18_19_39-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="708" data-original-width="833" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpTPB1N4iN3AW8ISJKCfvE_4RGfUGcugCx7elE3IsBaH53unhK8rX2qt4ZbvQTj__q02UAkTS3nLJLRNbm1HrsZgVgazFGEf5idW_0hw55Yj1yYBY_K-u2xyBfNQQOvr_d-3zp3Pt1NQ/s320/2021-02-02+18_19_39-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div><div>Looking at the ORDS terminal window, you will see the following warnings:</div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtuWT5F8blYLd82o4Hbyp6Cw3_6kkzU57bwdHoaasi6T-3ew6rXKthKg_8f4GZdYgTahgvBgSeY0QQIt1CF5z6JSmrqmSUXZOy0VzeNb7j3vg3-VAAP3hgrvO1siA7Cuod3owdC7PV_HzPgi9J731ATrS5u1E2SVbPVqON43FdkZw3-s861ZkZsQ/s979/2022-12-16%2012_27_48-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="74" data-original-width="979" height="48" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtuWT5F8blYLd82o4Hbyp6Cw3_6kkzU57bwdHoaasi6T-3ew6rXKthKg_8f4GZdYgTahgvBgSeY0QQIt1CF5z6JSmrqmSUXZOy0VzeNb7j3vg3-VAAP3hgrvO1siA7Cuod3owdC7PV_HzPgi9J731ATrS5u1E2SVbPVqON43FdkZw3-s861ZkZsQ/w640-h48/2022-12-16%2012_27_48-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div>Though this is not a production environment, I prefer to configure the system to run without these warnings. At least it makes it easier to notice, if something really goes wrong. In this single user environment, we can set both parameters to lower values like below. <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7eBSjl0LNSpjO8kGJDAsK2EJkKF05FJnHmCCyzD1jzJFaPoSwqHANs76B4XWhkLmZrXWbkJsA_vI0Ma2IW4XAfPl7Id7sUVDCJn0IZepRR7HTnkg3ZhUeW05kiwPJF8bXDBs9w-tZj3jJ3D6Mml35pKemv7VmpQdWMT_Sz92uCoA2t7TnKQc57g/s715/2022-12-16%2012_30_52-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="335" data-original-width="715" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7eBSjl0LNSpjO8kGJDAsK2EJkKF05FJnHmCCyzD1jzJFaPoSwqHANs76B4XWhkLmZrXWbkJsA_vI0Ma2IW4XAfPl7Id7sUVDCJn0IZepRR7HTnkg3ZhUeW05kiwPJF8bXDBs9w-tZj3jJ3D6Mml35pKemv7VmpQdWMT_Sz92uCoA2t7TnKQc57g/w400-h188/2022-12-16%2012_30_52-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" width="400" /></a></div><div>Go to /u01/ords-config/global/ and edit settings.xml. Add the following lines before the closing </properties>:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(248, 248, 248); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;"><entry</span> <span style="color: #7d9029;">key=</span><span style="color: #ba2121;">"jdbc.MaxLimit"</span><span style="color: green; font-weight: bold;">></span>20<span style="color: green; font-weight: bold;"></entry></span>
<span style="color: green; font-weight: bold;"><entry</span> <span style="color: #7d9029;">key=</span><span style="color: #ba2121;">"jdbc.InitialLimit"</span><span style="color: green; font-weight: bold;">></span>10<span style="color: green; font-weight: bold;"></entry></span>
</pre></div>
<div><br /></div><div>I also got the following error:</div><div><span style="font-family: courier;">INFO Disabling document root because the specified folder does not exist: /u01/ords-config/global/doc_root</span></div><div>To get rid of this INFO either create that directory or edit /u01/ords-config/global/settings.xml and set standalone.doc.root to an existing folder.</div><div><br /></div><div>Sometimes I ran into errors were all like <span style="font-family: courier;">WARNING The pool named: |apex|al| is invalid and will be ignored: The username or password for the connection pool named |apex|al|, are invalid, expired, or the account is locked</span></div><div>Probably I messed up my passwords when running the installer. This can be fixed by setting the passwords for the following users (and unlocking them, just in case):</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3
4
5
6
7
8</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> ORDS_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_LISTENER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_REST_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> ORDS_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_LISTENER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_REST_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
</pre></td></tr></tbody></table></div>
<div><br /></div><div>Now ORDS should come up without errors.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo4pkNGKFLnMINOV39F07W7jjpH0zcUrV2xr8Egn15_irotluDJSowjZf9gGWUPxuryPA7qgbLgVNM7yccnFCoRGJUTNQJSPhpvcjUMJDDKU8ESDF-r72NE2S91ujJwtscPH8IC-QAmxb9jxuKNkfmtfbR7ANcLl3Ys8e7pBl8GapIvwfdd73W0Q/s919/2022-12-16%2012_24_40-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="268" data-original-width="919" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo4pkNGKFLnMINOV39F07W7jjpH0zcUrV2xr8Egn15_irotluDJSowjZf9gGWUPxuryPA7qgbLgVNM7yccnFCoRGJUTNQJSPhpvcjUMJDDKU8ESDF-r72NE2S91ujJwtscPH8IC-QAmxb9jxuKNkfmtfbR7ANcLl3Ys8e7pBl8GapIvwfdd73W0Q/w640-h186/2022-12-16%2012_24_40-21c%20CICD%20%5Bwird%20ausgef%C3%BChrt%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Just to double check that everything is there, call http://localhost:8080/ords/sql-developer</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7P1kxbaBgdK29Cq2M4zNYjYALq8egvpLI0i94RykVD3A-4Gg2S-FZOVssxnLMjPNYdkBLQDIxrc1fQRbqMaOhuB1NNr7M4-u00oHsbtiozzKmoWhi8KZ3Q1DlhpMPW5BPNG_w2RhwcQ/s820/2021-02-03+17_51_58-Oracle+Database+Actions+_+Sign+in+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="537" data-original-width="820" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7P1kxbaBgdK29Cq2M4zNYjYALq8egvpLI0i94RykVD3A-4Gg2S-FZOVssxnLMjPNYdkBLQDIxrc1fQRbqMaOhuB1NNr7M4-u00oHsbtiozzKmoWhi8KZ3Q1DlhpMPW5BPNG_w2RhwcQ/w400-h263/2021-02-03+17_51_58-Oracle+Database+Actions+_+Sign+in+%25E2%2580%2594+Mozilla+Firefox.png" width="400" /></a></div>Of course, you need a rest enabled schema to log in. That's it, everything is running.Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-3745178417425336232022-10-12T06:10:00.005-07:002023-07-25T03:50:58.371-07:00How to install Synology Desktop Utilities on non-Debian Linux Systems<p>For Linux Desktop users with a Synology NAS, it is nice to use their Deskop Tooling. Unfortunately, Synology abandoned Support for .rpm based systems and only supports Debian's .deb format. Now these tools are not a must-use. Note Station can be used via the web front end and syncing could be done with any native Linux solution that you like. But if you want the ease of their tools, here is a possible solution.</p><p>UPDATE: since the Synology Drive Client is available via Flathub, I added this as the easiest option.</p><p>I have done this on OpenSUSE Tumbleweed, but this should work on any other .rpm based system.</p><p><b>1. The easiest way: Synology Drive Client from Flathub</b></p><p>On a KDE Plasma system like Tumbleweed or Manjaro, open Discover and add Flathub to your sources:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPe47yyb5UD34fykxrblNfos_LjvdA2HkuzhMe2Y4ID2-_45d0cx8DeKTldPN2noGzRKTGoWXn916KWTN3UMFQpvM63vCLbbMiXUdU91OxdGFDKEIbVc5lXWB-BrY9mnQPNE2MJGZJi-9hQQC0okjIUSJXw1F2MbFrmt3EkGPzoQ3lXQQ5fvLQ6A/s953/Screenshot_20221012_145523.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="458" data-original-width="953" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPe47yyb5UD34fykxrblNfos_LjvdA2HkuzhMe2Y4ID2-_45d0cx8DeKTldPN2noGzRKTGoWXn916KWTN3UMFQpvM63vCLbbMiXUdU91OxdGFDKEIbVc5lXWB-BrY9mnQPNE2MJGZJi-9hQQC0okjIUSJXw1F2MbFrmt3EkGPzoQ3lXQQ5fvLQ6A/w640-h308/Screenshot_20221012_145523.png" width="640" /></a></div>Search for Synology and install Synology Drive<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7adJMi3VSO8NgCfoT7YpygaM2MwYvXIiewG_PU5nX4oUQurfp6xEQ7KMiXfcNIax2sAHVIT52rFnW9qSD6atoAvWTh1jSyRxWWXnVNEQGurftmERYxGRPimlHETQQ9JdrBI1LKzwcC6lTz1o8SIKQHOJdjZkrG0ZNjTEYjMRGqHdLTYcPOJacbQ/s953/Screenshot_20221012_145810.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="457" data-original-width="953" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7adJMi3VSO8NgCfoT7YpygaM2MwYvXIiewG_PU5nX4oUQurfp6xEQ7KMiXfcNIax2sAHVIT52rFnW9qSD6atoAvWTh1jSyRxWWXnVNEQGurftmERYxGRPimlHETQQ9JdrBI1LKzwcC6lTz1o8SIKQHOJdjZkrG0ZNjTEYjMRGqHdLTYcPOJacbQ/w640-h306/Screenshot_20221012_145810.png" width="640" /></a></div><br /><div>As Flakpaks have limited system access by design, you need to configure Synology Drive to have file system access. The easiest way to do this is via another Flatpak app, search for Flatseal and install it.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjBAy87tXkCUitLa0NAzCStRF7x3bDsRRqzLCHL22dmCz8PO0hcxk7w6pGz2YhZ0mIHjQwwkFTBJ3SKJAX90HgBEjX2pha-gl044WPsyQfy4MEm0NGlcV0on-sL_H18MB23pDQa1dZKwqkPmtMfwUL4U3HsbOQZY9lDiiY7qx1HNJJAqXzbKVShA/s951/Screenshot_20221012_150105.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="342" data-original-width="951" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjBAy87tXkCUitLa0NAzCStRF7x3bDsRRqzLCHL22dmCz8PO0hcxk7w6pGz2YhZ0mIHjQwwkFTBJ3SKJAX90HgBEjX2pha-gl044WPsyQfy4MEm0NGlcV0on-sL_H18MB23pDQa1dZKwqkPmtMfwUL4U3HsbOQZY9lDiiY7qx1HNJJAqXzbKVShA/w640-h230/Screenshot_20221012_150105.png" width="640" /></a></div>Open Flatseal, select Synolgy Drive and grant it access to all directories you want to sync <br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN-CTjfl0yKvn8HUmAJoFIxOa6eDHG6OA5movlQX-PG2UB75X5jcR3aQt5I85_xxi6WYHyvfdQxsRpLr1ffS_5eqw26oMNj6NOIF_LI9VQTSOMB_n7ntNLuVxDAUlRS8HSm86af23X51ntG3-qWBHAFyXipXSHWmkc-MLZCQNzuJKxwim42zZMnQ/s1000/Screenshot_20221012_150229.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="699" data-original-width="1000" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN-CTjfl0yKvn8HUmAJoFIxOa6eDHG6OA5movlQX-PG2UB75X5jcR3aQt5I85_xxi6WYHyvfdQxsRpLr1ffS_5eqw26oMNj6NOIF_LI9VQTSOMB_n7ntNLuVxDAUlRS8HSm86af23X51ntG3-qWBHAFyXipXSHWmkc-MLZCQNzuJKxwim42zZMnQ/w640-h448/Screenshot_20221012_150229.png" width="640" /></a></div>Start Synology Drive and use it as usual<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1gdu-gqxaYicM5rCWlfOYuO6T1n-eX-i2AY_YsbRhDgHQ5FEOVYMWOa6J-0ptxBRxZ2zrVaN_xFRsYBhvKQoq48W6mtdCKVpM6n5aTmlvuHf5g9reVh8FJQxPYaXAQ7O5nVG7iaMuGM-iQFh7jKlom9M_YKctXxj66HzBLY-bsk4ZW5SR-lEL5w/s660/Screenshot_20221012_150726.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="525" data-original-width="660" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1gdu-gqxaYicM5rCWlfOYuO6T1n-eX-i2AY_YsbRhDgHQ5FEOVYMWOa6J-0ptxBRxZ2zrVaN_xFRsYBhvKQoq48W6mtdCKVpM6n5aTmlvuHf5g9reVh8FJQxPYaXAQ7O5nVG7iaMuGM-iQFh7jKlom9M_YKctXxj66HzBLY-bsk4ZW5SR-lEL5w/w400-h319/Screenshot_20221012_150726.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: left;">This solution has a drawback at least on my installation on OpenSUSE Tumbleweed with KDE: it only runs with X11, not with Plasma. If this happens to you, try the next solution.</div><p><b>2. The (somewhat) easy way: Synology Drive Client</b></p><p>If you can not or don't want to use Flakpaks, then try this solution:</p><p>Alien is your friend, so get any of the alien packages from <a href="https://software.opensuse.org/package/alien" target="_blank">software.opensuse.org</a>, download the .deb version of Synology Drive Client, use alien on it and just install the newly created .rpm (in my case synology-drive-7.0.2-12683.x86_64.rpm).</p><p>The tricky part was to get alien up and running. Alien requires rpm-build, which requires the patch utility. Tumbleweed comes with an older version of patch that comes with mingw, but rpm-build requires a newer one. So uninstall patch and install Gnu patch, then install rpm-build, then alien.</p><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">sudo alien -r synology-drive-client-12682.x86_64.deb
sudo zypper in synology-drive-7.0.2-12683.x86_64.rpm
</pre></div><p>Install it with zypper and you are done, this should also run on KDE Plasma.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYMHhJqRPNwzWLbowDlJrEhyDG8LIsaVmK2Z_T00eA3rf2F_KFmtWtfb535c19SMHUc-VRcDN63O8cVNvuP93Fe8mCd3DlZV2y62iPD3-Zo8tCQ_DLpOJVFhPTZSTHMg6zr3txpHHdHQ/s489/Screenshot_20211117_150816.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="437" data-original-width="489" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYMHhJqRPNwzWLbowDlJrEhyDG8LIsaVmK2Z_T00eA3rf2F_KFmtWtfb535c19SMHUc-VRcDN63O8cVNvuP93Fe8mCd3DlZV2y62iPD3-Zo8tCQ_DLpOJVFhPTZSTHMg6zr3txpHHdHQ/s320/Screenshot_20211117_150816.png" width="320" /></a></div><p>Everything works, it also starts automatically on login.</p><p><b>3. The hard way: Synology Note Station Client</b></p><p>Ideally, the above way should work with any of the Synology Tools. But doing so completely messed up my KDE Plasma environment. Right after the zypper install command, my did not react to any input anymore. After restart, I did not boot to the login screen, but was stuck on a dark grey screen with a mouse pointer. Instead of repairing, I quickly reinstalled Tumbleweed and tried it again. Same problem again, I can reproduce this at will. I did not had the time to fix this, so I reinstalled Tumbleweed again. Here is the workaround that I used:</p><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">sudo alien -g synology-note-station-client-2.2.1-553-linux-x64.deb
</pre></div><p></p><p></p><p>Again, use alien, but this time use the -g option to just unpack the .rpm to a directory structure.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq3IVPGCxd7A6GHKUHe827STp-PP8A284rCg6M2Ld6okCWCIwuMPOr6PLFxfDWFC995oeTeCQQauGhy_Iq9QsJulIsuFmDGZMojVeUI0bmiWjIR7dejjIzreQzPcUDEKCx1SRwQMgxMw/s746/Screenshot_20211117_152110.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="344" data-original-width="746" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq3IVPGCxd7A6GHKUHe827STp-PP8A284rCg6M2Ld6okCWCIwuMPOr6PLFxfDWFC995oeTeCQQauGhy_Iq9QsJulIsuFmDGZMojVeUI0bmiWjIR7dejjIzreQzPcUDEKCx1SRwQMgxMw/w400-h185/Screenshot_20211117_152110.png" width="400" /></a></div>This gives you a directory structure, that just needs to be copied to the corresponding directories ...<div><br /></div><div><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">cd synology-drive-client-12682.x86_64
sudo cp -R * /<br /></pre></div></div><div><br /></div><div>and that's it.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivSwaOiOgK7bDDQpUytE5qmonakvSEh7ffIIkpn3ZGqTWYvXCxgThRxX4gUpABTMTal8lhNlYXdEzluBSoUAly578U3Y2Y7RGI_sgmy5NIEpTBBKiizmdJugezGYS1dxSju1PHAIKi9Q/s973/Screenshot_20211117_152823.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="622" data-original-width="973" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivSwaOiOgK7bDDQpUytE5qmonakvSEh7ffIIkpn3ZGqTWYvXCxgThRxX4gUpABTMTal8lhNlYXdEzluBSoUAly578U3Y2Y7RGI_sgmy5NIEpTBBKiizmdJugezGYS1dxSju1PHAIKi9Q/s320/Screenshot_20211117_152823.png" width="320" /></a></div><br /><p>That works fine, I haven't had any issues until now.</p><p><br /></p></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-1251039873897855572022-10-11T06:18:00.001-07:002022-12-20T05:32:46.875-08:00Use SQL PIVOT to display a pivot table in Apex #JoelKallmanDay<p>In a project, we had the question on how we can visualize a pivot table in Apex. We have locations with warehouses, which we want to display as rows. In the columns, we needed the quantity of each stock item.</p><p>So our simple data model is:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz00MvMFISrGzdUCw86uXr4addUuA_pW7QiGb_DdRIb3W0_n4IC1E3mDws944tKu405o1XusjsK7lkpsl3aD9UqtH8_I1ddvdA3TsxvgR35eIuY63JLclXom_7K5kcN2S7uuh1WwxhwALzmlFjinNERY0nKlLzfmxPtDRWv6PwuEnAyb9iqAisyA/s946/2022-10-11%2014_55_47-Apex%20Questions%20an%20Answers.pptx%20-%20PowerPoint.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="946" height="95" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz00MvMFISrGzdUCw86uXr4addUuA_pW7QiGb_DdRIb3W0_n4IC1E3mDws944tKu405o1XusjsK7lkpsl3aD9UqtH8_I1ddvdA3TsxvgR35eIuY63JLclXom_7K5kcN2S7uuh1WwxhwALzmlFjinNERY0nKlLzfmxPtDRWv6PwuEnAyb9iqAisyA/w400-h95/2022-10-11%2014_55_47-Apex%20Questions%20an%20Answers.pptx%20-%20PowerPoint.png" width="400" /></a></div>To query all items with their stock, we use<div><br />
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">select</span> loc_id, loc_name, sto_quantity, item_name
<span style="color: #008800; font-weight: bold;">from</span> <span style="color: #008800; font-weight: bold;">location</span>, stock, item
<span style="color: #008800; font-weight: bold;">where</span> sto_loc_id_fk <span style="color: #333333;">=</span> loc_id
<span style="color: #008800; font-weight: bold;">and</span> sto_item_id_fk <span style="color: #333333;">=</span> item_id
</pre></div>
</div><div><br /></div><div>Using this statement for an Interactive Report in Apex gives the following output:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3MyQlomnj0cWq-cvVgllkJCHqkP8A82eY2rSJnSNgyRpyBMoku7g-VX4S-BE8N5gonRks498jIshhFe35yS7IARZDXUWdJ3vzCawz-sFN_C6_y0BnLziB61k_bn_Z-uAigWsRrl0XvCmRV1pWmfhnx1ZVqrul5mi5JkwEHFpu-svpjKr5ROOFsw/s1578/Picture1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="731" data-original-width="1578" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3MyQlomnj0cWq-cvVgllkJCHqkP8A82eY2rSJnSNgyRpyBMoku7g-VX4S-BE8N5gonRks498jIshhFe35yS7IARZDXUWdJ3vzCawz-sFN_C6_y0BnLziB61k_bn_Z-uAigWsRrl0XvCmRV1pWmfhnx1ZVqrul5mi5JkwEHFpu-svpjKr5ROOFsw/w400-h185/Picture1.png" width="400" /></a></div><br /><div>We have several lines for the same item, eg. Tire B in Frankfurt. So we need to sum up per item and location.</div><div>Apex does not have a native feature to make a pivot table from this data, as this is already implemented with the SQL PIVOT. The following statement gives us a row for every location and a colum for every items stock</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">select</span> <span style="color: #333333;">*</span> <span style="color: #008800; font-weight: bold;">from</span> (
<span style="color: #008800; font-weight: bold;">select</span> loc_id, loc_name, sto_quantity, item_name
<span style="color: #008800; font-weight: bold;">from</span> <span style="color: #008800; font-weight: bold;">location</span>, stock, item
<span style="color: #008800; font-weight: bold;">where</span> sto_loc_id_fk <span style="color: #333333;">=</span> loc_id
<span style="color: #008800; font-weight: bold;">and</span> sto_item_id_fk <span style="color: #333333;">=</span> item_id
)
pivot( <span style="color: #008800; font-weight: bold;">sum</span>(sto_quantity) <span style="color: #008800; font-weight: bold;">as</span> quantity <span style="color: #008800; font-weight: bold;">for</span> item_name
<span style="color: #008800; font-weight: bold;">in</span> (<span style="background-color: #fff0f0;">'Tire A'</span> <span style="color: #008800; font-weight: bold;">as</span> Tire_A, <span style="background-color: #fff0f0;">'Tire B'</span> <span style="color: #008800; font-weight: bold;">as</span> Tire_B, <span style="background-color: #fff0f0;">'Tire C'</span> <span style="color: #008800; font-weight: bold;">as</span> Tire_C,
<span style="background-color: #fff0f0;">'Screw A'</span> <span style="color: #008800; font-weight: bold;">as</span> Screw_A, <span style="background-color: #fff0f0;">'Screw B'</span> <span style="color: #008800; font-weight: bold;">as</span> Screw_B, <span style="background-color: #fff0f0;">'Screw C'</span> <span style="color: #008800; font-weight: bold;">as</span> Screw_C)
);
</pre></div>
<div><p>Using this as a source for another Interactive Report gives us the required pivot view</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuY_d3d9Ry9mrhFcRNeoP0hqZp5l426xm_XyFZC3_ETPeBTDzkorjT5j2phgEdsIK2UhxnZ3fgk6o49bEynAKEVNyyEL9PVbWCJg36p1VD4wBEYZxokiLLEycSNJorIwy0oORn4onoGJHFmineqD4P4Bf6pNzTaBiVIaviA525W8V_WpM-zIVTVA/s1434/Picture2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="513" data-original-width="1434" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuY_d3d9Ry9mrhFcRNeoP0hqZp5l426xm_XyFZC3_ETPeBTDzkorjT5j2phgEdsIK2UhxnZ3fgk6o49bEynAKEVNyyEL9PVbWCJg36p1VD4wBEYZxokiLLEycSNJorIwy0oORn4onoGJHFmineqD4P4Bf6pNzTaBiVIaviA525W8V_WpM-zIVTVA/w640-h228/Picture2.png" width="640" /></a></div>
<p>Easy as that. If you want to try yourself, here is the SQL code to create the tables and some test data.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">drop</span> <span style="color: #008800; font-weight: bold;">table</span> <span style="color: #008800; font-weight: bold;">location</span>;
<span style="color: #008800; font-weight: bold;">drop</span> <span style="color: #008800; font-weight: bold;">table</span> stock;
<span style="color: #008800; font-weight: bold;">drop</span> <span style="color: #008800; font-weight: bold;">table</span> item;
<span style="color: #008800; font-weight: bold;">create</span> <span style="color: #008800; font-weight: bold;">table</span> <span style="color: #008800; font-weight: bold;">location</span> (
loc_id <span style="color: #007020;">number</span> <span style="color: #008800; font-weight: bold;">generated</span> <span style="color: #008800; font-weight: bold;">by</span> <span style="color: #008800; font-weight: bold;">default</span> <span style="color: #008800; font-weight: bold;">on</span> <span style="color: #008800; font-weight: bold;">null</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #008800; font-weight: bold;">identity</span>
<span style="color: #008800; font-weight: bold;">constraint</span> location_loc_id_pk <span style="color: #008800; font-weight: bold;">primary</span> <span style="color: #008800; font-weight: bold;">key</span>,
loc_name varchar2(<span style="color: #0000dd; font-weight: bold;">30</span> <span style="color: #007020;">char</span>)
)
;
<span style="color: #008800; font-weight: bold;">create</span> <span style="color: #008800; font-weight: bold;">table</span> stock (
sto_id <span style="color: #007020;">number</span> <span style="color: #008800; font-weight: bold;">generated</span> <span style="color: #008800; font-weight: bold;">by</span> <span style="color: #008800; font-weight: bold;">default</span> <span style="color: #008800; font-weight: bold;">on</span> <span style="color: #008800; font-weight: bold;">null</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #008800; font-weight: bold;">identity</span>
<span style="color: #008800; font-weight: bold;">constraint</span> stock_sto_id_pk <span style="color: #008800; font-weight: bold;">primary</span> <span style="color: #008800; font-weight: bold;">key</span>,
sto_loc_id_fk <span style="color: #007020;">number</span>,
sto_item_id_fk <span style="color: #007020;">number</span>,
sto_quantity <span style="color: #007020;">number</span>
)
;
<span style="color: #008800; font-weight: bold;">create</span> <span style="color: #008800; font-weight: bold;">table</span> item (
item_id <span style="color: #007020;">number</span> <span style="color: #008800; font-weight: bold;">generated</span> <span style="color: #008800; font-weight: bold;">by</span> <span style="color: #008800; font-weight: bold;">default</span> <span style="color: #008800; font-weight: bold;">on</span> <span style="color: #008800; font-weight: bold;">null</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #008800; font-weight: bold;">identity</span>
<span style="color: #008800; font-weight: bold;">constraint</span> item_item_id_pk <span style="color: #008800; font-weight: bold;">primary</span> <span style="color: #008800; font-weight: bold;">key</span>,
item_name varchar2(<span style="color: #0000dd; font-weight: bold;">30</span> <span style="color: #007020;">char</span>)
)
;
<span style="color: #008800; font-weight: bold;">create</span> <span style="color: #008800; font-weight: bold;">or</span> <span style="color: #008800; font-weight: bold;">replace</span> <span style="color: #008800; font-weight: bold;">procedure</span> create_stock_data <span style="color: #008800; font-weight: bold;">as</span>
<span style="color: #008800; font-weight: bold;">type</span> vc_list <span style="color: #008800; font-weight: bold;">is</span> <span style="color: #008800; font-weight: bold;">table</span> <span style="color: #008800; font-weight: bold;">of</span> varchar2(<span style="color: #0000dd; font-weight: bold;">32</span>)
<span style="color: #008800; font-weight: bold;">index</span> <span style="color: #008800; font-weight: bold;">by</span> pls_integer;
loc_list vc_list;
item_list vc_list;
<span style="color: #008800; font-weight: bold;">begin</span>
loc_list :<span style="color: #333333;">=</span> vc_list(<span style="background-color: #fff0f0;">'Frankfurt'</span>,<span style="background-color: #fff0f0;">'Hannover'</span>,<span style="background-color: #fff0f0;">'Berlin'</span>,<span style="background-color: #fff0f0;">'Regensburg'</span>,<span style="background-color: #fff0f0;">'Elmshorn'</span>,<span style="background-color: #fff0f0;">'Bensheim'</span>);
<span style="color: #008800; font-weight: bold;">for</span> idx <span style="color: #008800; font-weight: bold;">in</span> indices <span style="color: #008800; font-weight: bold;">of</span> loc_list loop
dbms_output.put_line( idx <span style="color: #333333;">||</span> <span style="background-color: #fff0f0;">': '</span> <span style="color: #333333;">||</span> loc_list(idx) );
<span style="color: #008800; font-weight: bold;">insert</span> <span style="color: #008800; font-weight: bold;">into</span> <span style="color: #008800; font-weight: bold;">location</span>
(loc_id, loc_name)
<span style="color: #008800; font-weight: bold;">values</span> (idx, loc_list(idx) );
<span style="color: #008800; font-weight: bold;">end</span> loop;
item_list :<span style="color: #333333;">=</span> vc_list(<span style="background-color: #fff0f0;">'Tire A'</span>, <span style="background-color: #fff0f0;">'Tire B'</span>, <span style="background-color: #fff0f0;">'Tire C'</span>,<span style="background-color: #fff0f0;">'Screw A'</span>,<span style="background-color: #fff0f0;">'Screw B'</span>,<span style="background-color: #fff0f0;">'Screw C'</span>);
<span style="color: #008800; font-weight: bold;">for</span> idx <span style="color: #008800; font-weight: bold;">in</span> indices <span style="color: #008800; font-weight: bold;">of</span> loc_list loop
dbms_output.put_line( idx <span style="color: #333333;">||</span> <span style="background-color: #fff0f0;">': '</span> <span style="color: #333333;">||</span> item_list(idx) );
<span style="color: #008800; font-weight: bold;">insert</span> <span style="color: #008800; font-weight: bold;">into</span> item
(item_id, item_name)
<span style="color: #008800; font-weight: bold;">values</span> (idx, item_list(idx) );
<span style="color: #008800; font-weight: bold;">end</span> loop;
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: #008800; font-weight: bold;">in</span> <span style="color: #0000dd; font-weight: bold;">1</span>..<span style="color: #0000dd; font-weight: bold;">100</span> loop
dbms_output.put_line(i);
<span style="color: #008800; font-weight: bold;">insert</span> <span style="color: #008800; font-weight: bold;">into</span> stock
(sto_id, sto_loc_id_fk, sto_item_id_fk, sto_quantity)
<span style="color: #008800; font-weight: bold;">values</span> (i, round(dbms_random.value(<span style="color: #0000dd; font-weight: bold;">1</span>,<span style="color: #0000dd; font-weight: bold;">6</span>)), round(dbms_random.value(<span style="color: #0000dd; font-weight: bold;">1</span>,<span style="color: #0000dd; font-weight: bold;">6</span>)), round(dbms_random.value(<span style="color: #0000dd; font-weight: bold;">1</span>,<span style="color: #0000dd; font-weight: bold;">100</span>)) );
<span style="color: #008800; font-weight: bold;">end</span> loop;
<span style="color: #008800; font-weight: bold;">end</span> create_stock_data;
<span style="color: #333333;">/</span>
</pre></div>
</div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-48103564100486311432022-09-15T06:47:00.003-07:002022-09-15T06:57:24.480-07:00Clone a pluggable Database with APEX and connect to ORDS 22.x <p> This is an update to my older post <a href="https://arnes-stuff.blogspot.com/2021/10/clone-pluggable-database-with-apex-and.html" target="_blank">Clone a pluggable Database with APEX and connect to ORDS</a>, which is still valid for older ORDS-versions before 22.x.</p><p>---8<-----------------------------------------------------------------------------</p><p>Sometimes I quickly need another test/dev environment for Apex. There are several ways to get one: snapshot or clone the VM, create one with Liquibase or clone the PDB and link the ORDS to it as described below. This is meant as a short cookbook, find more detailed information on the sites from <a href="https://www.thatjeffsmith.com/archive/2020/02/sql-developer-web-for-2-or-more-databases/" target="_blank">Jeff Smith</a> or <a href="https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-configure-multiple-databases" target="_blank">Oracle-Base</a>.</p><p>Start by connecting to your CDB and create a clone of the PDB where Apex is installed.</p><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;"><span style="color: #0000aa;">create</span> pluggable <span style="color: #0000aa;">database</span> apexpdb2 <span style="color: #0000aa;">from</span> apexpdb1
file_name_convert = (<span style="color: #aa5500;">'/apexpdb1/'</span>, <span style="color: #aa5500;">'/apexpdb2/'</span>);
<span style="color: #0000aa;">alter</span> pluggable <span style="color: #0000aa;">database</span> apexpdb2 <span style="color: #0000aa;">open</span>;
sho pdbs
<span style="color: #0000aa;">alter</span> <span style="color: #0000aa;">session</span> <span style="color: #0000aa;">set</span> container=apexpdb2;
<span style="color: #0000aa;">select</span> * <span style="color: #0000aa;">from</span> apex_release;
</pre></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid-3egWIRfh9tBfUMGG_8xCbrWxJfs-Db00WaOshAjAkd8TWu31HkI4iac76sUQuF5ziE1dfBzGuNoA5n57JcWv2LvkHWtzuZNhzyq-IxvQC4d0DwCxzakkoNgtrNn0oPiAnln6tsKo1Yd3woPBgTh5W8qz9exPF-qg9Cne7pLpa6NHSMkmuebIA/s601/2022-09-15%2015_23_02-OL8%20DB21%20(Apex-22-1-5)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="601" data-original-width="502" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid-3egWIRfh9tBfUMGG_8xCbrWxJfs-Db00WaOshAjAkd8TWu31HkI4iac76sUQuF5ziE1dfBzGuNoA5n57JcWv2LvkHWtzuZNhzyq-IxvQC4d0DwCxzakkoNgtrNn0oPiAnln6tsKo1Yd3woPBgTh5W8qz9exPF-qg9Cne7pLpa6NHSMkmuebIA/s320/2022-09-15%2015_23_02-OL8%20DB21%20(Apex-22-1-5)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="267" /></a></div><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;">Double check, that the new PDB has a valid APEX version installed. Add the newly created database in your $TNSADMIN/tnsnames.ora like</span></div><div><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;"><span style="color: #336699;">APEXPDB2</span> =
(<span style="color: #336699;">DESCRIPTION</span> =
(<span style="color: #336699;">ADDRESS</span> = (<span style="color: #336699;">PROTOCOL</span> = TCP)(<span style="color: #336699;">HOST</span> = localhost)(<span style="color: #336699;">PORT</span> = 1521))
(<span style="color: #336699;">CONNECT_DATA</span> =
(<span style="color: #336699;">SERVER</span> = DEDICATED)
(<span style="color: #336699;">SERVICE_NAME</span> = apexpdb2)
)
)
</pre></div></div><div><br /></div><div>So much for for the database. Now all we have to do is to tell ORDS about the 2nd PDB. There is a <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/22.2/ordig/configuring-additional-databases.html#GUID-C8D8F633-2777-41C5-BC4E-CC1F222CCDC0" target="_blank">chapter in the documentation</a> for this, so the setup is straight forward. For dealing with ORDS, some settings should be made in .bashrc<div><br /></div><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;"><span style="color: #003388;">export </span><span style="color: #336699;">ORDS_CONFIG</span>=/u01/ords/config
<span style="color: #003388;">export </span><span style="color: #336699;">ORDS_HOME</span>=/u01/ords-22-2
<span style="color: #003388;">export </span><span style="color: #336699;">PATH</span>=<span style="color: #336699;">$ORDS_HOME</span>/bin:<span style="color: #336699;">$PATH</span>
</pre></div><div><br /></div><div>Stop ORDS if it is already running We need to add the DB with the following if we want to use the interactive mode</div><div><br /><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">ords install -i
</pre></div></div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYSyP7IrLCLDiV5RYt9rk-WCpYOPp7vXSXkP7dDXZAIZ8Nk5z3TYsxgJ7EYnp7D-7XGjhOxh-EezYtpQd9iIlil2dTDb-PLHHdAg-qVRb6aUWbz5o3SDsIHe7Qxiqcet2K3qNTbkN2jo4lLDcL5x8vpKXBS_j9vtO6rcVCNa90JZU0vP8cL-RdnA/s939/2022-09-15%2015_32_36-OL8%20DB21%20(Apex-22-1-5)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="624" data-original-width="939" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYSyP7IrLCLDiV5RYt9rk-WCpYOPp7vXSXkP7dDXZAIZ8Nk5z3TYsxgJ7EYnp7D-7XGjhOxh-EezYtpQd9iIlil2dTDb-PLHHdAg-qVRb6aUWbz5o3SDsIHe7Qxiqcet2K3qNTbkN2jo4lLDcL5x8vpKXBS_j9vtO6rcVCNa90JZU0vP8cL-RdnA/w640-h426/2022-09-15%2015_32_36-OL8%20DB21%20(Apex-22-1-5)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJAsTO6yNhC_lz_XnD0mIHUtJcaqPhLGcXv9tEYOTz7FxfNgXStygUB-IpF6PXf9Vpx_7BYrRTumeLYCpMzcrAjLKagEPp122Q9jUPJaSxQLGstRwYnBJdjsRikiV3elrt44iSBmHtNTdzGhY47lEzOhGIoieCVdaLH66U7pQv9MXODOdk64pC7w/s869/2022-09-15%2015_34_08-OL8%20DB21%20(Apex-22-1-5)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="380" data-original-width="869" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJAsTO6yNhC_lz_XnD0mIHUtJcaqPhLGcXv9tEYOTz7FxfNgXStygUB-IpF6PXf9Vpx_7BYrRTumeLYCpMzcrAjLKagEPp122Q9jUPJaSxQLGstRwYnBJdjsRikiV3elrt44iSBmHtNTdzGhY47lEzOhGIoieCVdaLH66U7pQv9MXODOdk64pC7w/w640-h280/2022-09-15%2015_34_08-OL8%20DB21%20(Apex-22-1-5)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;"><span style="text-align: left;">At the end, ORDS should be running in standalone mode. If you don't like interactive installations, you can do the same with one (loooong) command. First we need a text file with the passwords for the admin and proxy user:</span></div>
<div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">[oracle@orcldevvm-ol8 ~]<span style="color: #336699;">$ </span>cat password.txt
oracle
oracle
</pre></div><div><br /></div><div>Then run something like</div><div><br /></div><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">ords install --db-pool apexpdb2 --db-hostname localhost --db-port 1521 --db-servicename apexpdb2 --feature-sdw <span style="color: #003388;">true</span> --feature-db-api <span style="color: #003388;">true</span> --feature-rest-enabled-sql <span style="color: #003388;">true</span> --admin-user sys --proxy-user --password-stdin < password.txt</pre></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>Open the new URL with your browser, in my case:</div><div><br /></div></div><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><div><span style="font-family: courier;">vm:8080/ords/apex<u>pdb2</u>/apex</span></div></blockquote><div><div><br /></div><div>The difference between the first and all other databases for an ORDS is, that the first one is always accessible without an additional base-path (like vm:8080/ords/apex) whereas the others always need that base-path. If you want a base-path also for the first database, see this <a href="https://www.thatjeffsmith.com/archive/2020/02/sql-developer-web-for-2-or-more-databases/" target="_blank">posting from Jeff Smith</a>. </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82TlUlzm-_VI4u3xPa3qWL9sDdCE3hOQa5iWVbJnKBUTc_eL5eiTgsgXyAxEmw7-jNFKH49sNxqByo9mYwXOJxId3Dls6n8rKMYZNLO0rz7P6J2IzgW-exF-4V0MD7nAS5ei2mxoOcw/s754/2021-10-11+14_30_25-Application+Express+-+Sign+In+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="754" data-original-width="688" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82TlUlzm-_VI4u3xPa3qWL9sDdCE3hOQa5iWVbJnKBUTc_eL5eiTgsgXyAxEmw7-jNFKH49sNxqByo9mYwXOJxId3Dls6n8rKMYZNLO0rz7P6J2IzgW-exF-4V0MD7nAS5ei2mxoOcw/s320/2021-10-11+14_30_25-Application+Express+-+Sign+In+%25E2%2580%2594+Mozilla+Firefox.png" width="292" /></a></div>Apex for the second PDB should be available under that new URL.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVpcU1C5TPa8NrTZ0IuggDv4I-x743hJyCvNhvCMUfd1c0I4_1Nb1m6tUH9vF8mmVVIWctSCbpoqHSUvL_HfenPKctNrLhCeW7LBu46laZz7EzGR2FuGY4J1ebFgJgJPZUsKx_EdrrPA/s739/2021-10-11+16_35_03-Oracle+Database+Actions+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="538" data-original-width="739" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVpcU1C5TPa8NrTZ0IuggDv4I-x743hJyCvNhvCMUfd1c0I4_1Nb1m6tUH9vF8mmVVIWctSCbpoqHSUvL_HfenPKctNrLhCeW7LBu46laZz7EzGR2FuGY4J1ebFgJgJPZUsKx_EdrrPA/w400-h291/2021-10-11+16_35_03-Oracle+Database+Actions+%25E2%2580%2594+Mozilla+Firefox.png" width="400" /></a></div>And there is also a second Database Actions / SQLDeveloper Web under that new URL pattern.</div><div><br /></div><div>This is done in less than 5 minutes and depending on your environment, this might be faster than cloning the complete VM. And dropping it only takes seconds, what also might be faster than restoring a snapshot of your VM.<br /><div><br /></div></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-87539531655921646332022-05-12T05:45:00.001-07:002022-05-20T06:00:25.938-07:00Run two different Apex versions on a single standalone ORDS <p>A single standalone ORDS can handle multiple database connections with Apex as described <a href="https://arnes-stuff.blogspot.com/2021/10/clone-pluggable-database-with-apex-and.html" target="_blank">here</a>. But without additional configuration, this can be problematic if not all Apex instances are on the same version. For example, in the Developer VM Project, we have two PDB's with APEX locally installed at version 21.5.</p><p>When upgrading one PDB to Apex 22.1, the last step according to the <a href="https://docs.oracle.com/en/database/oracle/application-express/22.1/htmig/configuring-ords.html#GUID-C070563B-2080-4DB1-A5FB-48B4D1B57D77" target="_blank">documentation</a> is <i>Copying the Images Directory</i>. After that step, the images directory files are on version 22.1 whereas the unpatched 2nd PDB is still running 21.5, which will lead to the following error:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC3N1ar-pTDQ0EQJCzpohlkOIsWBFeXcOWAtENolU-uXforY4um7pQbnt0kxASM_r-WInVe_ExezsTv6udz6e4LZ0tA25q-RUmPo4vgYHglReTnYdToOXoISoQkOO8LGRQbMVC_yxnYuhbB5xi1SqZ-JJkXq4nkMQFBWRnpGsJmCgQ3hGwuy6nKA/s501/2022-05-11%2014_46_22-Application%20Express%20-%20Sign%20In%20-%20Vivaldi.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="270" data-original-width="501" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC3N1ar-pTDQ0EQJCzpohlkOIsWBFeXcOWAtENolU-uXforY4um7pQbnt0kxASM_r-WInVe_ExezsTv6udz6e4LZ0tA25q-RUmPo4vgYHglReTnYdToOXoISoQkOO8LGRQbMVC_yxnYuhbB5xi1SqZ-JJkXq4nkMQFBWRnpGsJmCgQ3hGwuy6nKA/s320/2022-05-11%2014_46_22-Application%20Express%20-%20Sign%20In%20-%20Vivaldi.png" width="320" /></a></div><div style="text-align: center;"><i><span style="font-size: x-small;">Error: There is a problem with your environment because the Application Express files are not up-to-date!</span></i></div><p>So as long as not all Apex environments on a given ORDS instance are updated within the same maintenance window, seperate images directories are needed for at least any Apex version running on that ORDS. An image prefix maps to a virtual directory, for more information see <a href="https://joelkallman.blogspot.com/2013/05/image-prefix-changes-in-oracle.html" target="_blank">Image Prefix changes in Oracle Application Express 4.2.2</a>.</p><p>I have found no solution to configure multiple virtual directories on for standalone ORDS. But even with only a single static files directory, several file versions can be put below that single root.</p><p>Just organize the files in separate directories per version like images/images-21-5. This can be configured per application under <i>Shared Components/User Interface Attributes</i>.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji-iFXAY6ePdkP1wr6h4pixHcHEPEEK4dMRjcIx16X2GmILLUlfi7pGF7x0bNT2UD6seIpfy_IRkQwFs_FmxcOQo9bM0kWXDU_h0DIalB0XHq_DXTRC7gd_fMKhPbqBeIc3iV1Ssjf4zwOJTxiGP3qo9NNK88UOG6-ypn5MZaxjaEWWRdJ1J1lQQ/s1121/2022-05-12%2013_44_06-Edit%20User%20Interfaces%20%E2%80%94%20Firefox%20Developer%20Edition.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="458" data-original-width="1121" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji-iFXAY6ePdkP1wr6h4pixHcHEPEEK4dMRjcIx16X2GmILLUlfi7pGF7x0bNT2UD6seIpfy_IRkQwFs_FmxcOQo9bM0kWXDU_h0DIalB0XHq_DXTRC7gd_fMKhPbqBeIc3iV1Ssjf4zwOJTxiGP3qo9NNK88UOG6-ypn5MZaxjaEWWRdJ1J1lQQ/w640-h262/2022-05-12%2013_44_06-Edit%20User%20Interfaces%20%E2%80%94%20Firefox%20Developer%20Edition.png" width="640" /></a></div><div>If you have more than one application on the Apex instance, the setting could be set at once for the whole instance with the reset_image_prefix.sql script, that comes with your Apex installation under utilities. Usage is described in the MOS-Note <a href="https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=369102709068192&id=2817084.1&_afrWindowMode=0&_adf.ctrl-state=o35stp817_4" target="_blank">How to Switch APEX to Use Oracle APEX Static Resources on Content Delivery Network (CDN) (Doc ID 2817084.1)</a>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinqJ5H0t8zUed2b8kTTFqAPA8BjhFrvqJt7-0ntB8lQzug-ITudE_osghNpDLfcXNfgs7odXHnBCD_8g7fT1FdPJUZLInCFQLaE_V0yFWR0LYp-yidUXLa7IqtbAsdfiafS0XIPJZeSLIQRh-OQZ1GifQeGZVwaxVwJvtpuF2j-uT8F8cZJbOfcQ/s600/2022-05-12%2014_02_13-Apex-Test%20(Testbeginn)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="561" data-original-width="600" height="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinqJ5H0t8zUed2b8kTTFqAPA8BjhFrvqJt7-0ntB8lQzug-ITudE_osghNpDLfcXNfgs7odXHnBCD_8g7fT1FdPJUZLInCFQLaE_V0yFWR0LYp-yidUXLa7IqtbAsdfiafS0XIPJZeSLIQRh-OQZ1GifQeGZVwaxVwJvtpuF2j-uT8F8cZJbOfcQ/w400-h374/2022-05-12%2014_02_13-Apex-Test%20(Testbeginn)%20%5BRunning%5D%20-%20Oracle%20VM%20VirtualBox.png" width="400" /></a></div>This script also does some cleanup which takes some time, so according to this <a href="https://blogs.oracle.com/apex/post/announcing-oracle-apex-static-resources-on-content-delivery-network" target="_blank">blog post</a> this is not recommended for production.<div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">begin</span>
apex_instance_admin.set_parameter(
p_parameter => <span style="background-color: #fff0f0; color: #dd2200;">'IMAGE_PREFIX'</span>,
p_value => <span style="background-color: #fff0f0; color: #dd2200;">'/i/images-21-5'</span> );
<span style="color: #008800; font-weight: bold;">commit</span>;
<span style="color: #008800; font-weight: bold;">end</span>;
</pre></div>
<div><br /></div><div>Alternatively this can be done with the above listed procedure, that does not do the invalidation. But in my instance, the changes took not effect immediately. So probably the invalidation in the script is there for a reason.</div><div><br /></div><div>Especially if your Apex application is used over public internet, you might want to get rid of the static files anyways and use the the Content Delivery Network instead as described in <a href="https://blogs.oracle.com/apex/post/announcing-oracle-apex-static-resources-on-content-delivery-network" target="_blank">Announcing Oracle APEX Static Resources on Content Delivery Network</a>.</div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-31469520491414692572022-04-20T04:09:00.003-07:002022-12-20T04:12:14.252-08:00Use SQLcl in Oracle Linux 8 on Windows Subsystem for Linux<p>There is an update to this post on my <a href="https://arnes-stuff.blogspot.com/2022/12/use-sqlcl-with-oracle-9-in-windows.html">Blog</a>.</p><p>---8<-----------------------------------------------------------------------------------</p><p>Windows Subsystem for Linux is a great way to have Linux functionality on Windows. For the first time usage, follow the Microsoft <a href="https://docs.microsoft.com/en-us/windows/wsl/install" target="_blank">Documentation</a> to install it. Oracle Linux 7.9 and 8.5 are available in the Microsoft Store as fully compatible, free RHEL/CentOS alternatives. And SQLcl can easily installed, as long as you have Java on the system.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju7JRBTQ7QGvYcXkm_q9-dJRdKf90vMDRHC0aoh1kTTmiwt-r0Aa54Jf_nWVV3nvBqnMP8to9KSh1bmdadpWv7IB8rgi8-qKs6DaIIigDl00PMWg6LZrhOBsaI7Gpe1ZvDfnOxNT7f7U1FrgsSt4MILE2aGHTXBzLUPAi7osj-FbZjH0x-oC-TzQ/s1186/2022-04-12%2008_21_21-Microsoft%20Store.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="784" data-original-width="1186" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEju7JRBTQ7QGvYcXkm_q9-dJRdKf90vMDRHC0aoh1kTTmiwt-r0Aa54Jf_nWVV3nvBqnMP8to9KSh1bmdadpWv7IB8rgi8-qKs6DaIIigDl00PMWg6LZrhOBsaI7Gpe1ZvDfnOxNT7f7U1FrgsSt4MILE2aGHTXBzLUPAi7osj-FbZjH0x-oC-TzQ/w400-h265/2022-04-12%2008_21_21-Microsoft%20Store.png" width="400" /></a></div>It installed within minutes and can immediately be updated via sudo dnf update. But when I tried so install Java, I got a <div><br />
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">RPM: error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
</pre></div>
<p>Looks like the RPM repository is defect. I found the solution on <a href="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues/47#issuecomment-531773376" target="_blank">GitHub</a>:</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sudo -s
<span style="color: #003388;">cd</span> /var/lib/rpm
rpm --rebuilddb
dd <span style="color: #008800; font-weight: bold;">if</span>=/dev/zero <span style="color: #336699;">of</span>=__db.001 <span style="color: #336699;">bs</span>=1M <span style="color: #336699;">count</span>=1
dd <span style="color: #008800; font-weight: bold;">if</span>=/dev/zero <span style="color: #336699;">of</span>=__db.002 <span style="color: #336699;">bs</span>=1M <span style="color: #336699;">count</span>=1
dd <span style="color: #008800; font-weight: bold;">if</span>=/dev/zero <span style="color: #336699;">of</span>=__db.003 <span style="color: #336699;">bs</span>=1M <span style="color: #336699;">count</span>=1
rpm -qa rpm
</pre></div>
<p>Follow the postings on <a href="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues/47#issuecomment-531773376" target="_blank">GitHub</a>. There seem to be easier solutions, but I did not double check them, because the first one worked for me.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sudo dnf in java-11-openjdk.x86_64
</pre></div>
<p>Now JDK installs without problems, for SQLcl 22.1 at least JDK 11.x is mandatory.</p><p>Download latest SQLcl zip archive from oracle.com/sqlcl and copy the contents to any directory, like ~/bin/sqlcl</p><p>Add the path to the SQLcl binary to your .bashrc and source it. A cool feature of WLS is, that all your Windows drives are automatically mounted under /mnt/c, /mnt/d etc. So if you already have a network/admin directory under Windows, you can point your TNS_ADMIN to that location. </p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #003388;">export </span><span style="color: #336699;">PATH</span>=/home/arne/bin/sqlcl/bin:<span style="color: #336699;">$PATH</span>
<span style="color: #003388;">export </span><span style="color: #336699;">TNS_ADMIN</span>=/mnt/d/Oracle/network/admin
</pre></div>
<p>This is what my .bashrc ends with.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBL4bO1LX87b6MAcQomhXnPnYExINBHDKsdqyok1EKvX_bwBMSYkkOL1o8i3UVg-lhz6TcAS5zHXT0JL3aeCXXHWmWmRmTTPCilLaXD5Pmd0y4_Y-12ahgNe5JT1RInKY8FOV_FEn8on7Ew8Zra0Dbo_n5D3sy88eAvPxDIeTZO_s3iQM32_uRDg/s880/2022-04-20%2013_03_26-Post_%20Edit%20-%20Vivaldi.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="520" data-original-width="880" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBL4bO1LX87b6MAcQomhXnPnYExINBHDKsdqyok1EKvX_bwBMSYkkOL1o8i3UVg-lhz6TcAS5zHXT0JL3aeCXXHWmWmRmTTPCilLaXD5Pmd0y4_Y-12ahgNe5JT1RInKY8FOV_FEn8on7Ew8Zra0Dbo_n5D3sy88eAvPxDIeTZO_s3iQM32_uRDg/w400-h236/2022-04-20%2013_03_26-Post_%20Edit%20-%20Vivaldi.png" width="400" /></a></div><p>That gives me access from Linux to all databases I have configured under Windows.</p></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-60538477368914462092021-11-17T06:36:00.005-08:002023-07-25T04:01:10.095-07:00Install Synology Desktop Utilities on non-Debian Systems<p>Update: I have made a <a href="https://arnes-stuff.blogspot.com/2022/10/how-to-install-synology-desktop.html">newer version</a> of this post, including a Flatpak solution</p><span><a name='more'></a></span><p>For Linux Desktop users with a Synology NAS, it is nice to use their Deskop Tooling. Unfortunately, Synology abandoned Support for .rpm based systems and only supports Debian's .deb format. Now these tools are not a must-use. Note Station can be used via the web front end and syncing could be done with any native Linux solution that you like. But if you want the ease of their tools, here is a possible solution.</p><p>I have done this on OpenSUSE Tumbleweed, but this should work on any other .rpm based system.</p><p><b>1. The easy way: Synology Drive Client</b></p><p>Alien is your friend, so get any of the alien packages from <a href="https://software.opensuse.org/package/alien" target="_blank">software.opensuse.org</a>, download the .deb version of Synology Drive Client, use alien on it and just install the newly created .rpm (in my case synology-drive-7.0.2-12683.x86_64.rpm).</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sudo alien -r synology-drive-client-12682.x86_64.deb
sudo zypper in synology-drive-7.0.2-12683.x86_64.rpm
</pre></div>
<p>Install it with zypper and you are done</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYMHhJqRPNwzWLbowDlJrEhyDG8LIsaVmK2Z_T00eA3rf2F_KFmtWtfb535c19SMHUc-VRcDN63O8cVNvuP93Fe8mCd3DlZV2y62iPD3-Zo8tCQ_DLpOJVFhPTZSTHMg6zr3txpHHdHQ/s489/Screenshot_20211117_150816.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="437" data-original-width="489" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYMHhJqRPNwzWLbowDlJrEhyDG8LIsaVmK2Z_T00eA3rf2F_KFmtWtfb535c19SMHUc-VRcDN63O8cVNvuP93Fe8mCd3DlZV2y62iPD3-Zo8tCQ_DLpOJVFhPTZSTHMg6zr3txpHHdHQ/s320/Screenshot_20211117_150816.png" width="320" /></a></div><p>Everything works, it also starts automatically on login.</p><p><b>2. The hard way: Synology Note Station Client</b></p><p>Ideally, the above way should work with any of the Synology Tools. But doing so completely messed up my KDE Plasma environment. Right after the zypper install command, my did not react to any input anymore. After restart, I did not boot to the login screen, but was stuck on a dark grey screen with a mouse pointer. Instead of repairing, I quickly reinstalled Tumbleweed and tried it again. Same problem again, I can reproduce this at will. I did not had the time to fix this, so I reinstalled Tumbleweed again. Here is the workaround that I used:</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sudo alien -g synology-note-station-client-2.2.1-553-linux-x64.deb
</pre></div>
<p></p><p></p><p>Again, use alien, but this time use the -g option to just unpack the .rpm to a directory structure.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq3IVPGCxd7A6GHKUHe827STp-PP8A284rCg6M2Ld6okCWCIwuMPOr6PLFxfDWFC995oeTeCQQauGhy_Iq9QsJulIsuFmDGZMojVeUI0bmiWjIR7dejjIzreQzPcUDEKCx1SRwQMgxMw/s746/Screenshot_20211117_152110.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="344" data-original-width="746" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq3IVPGCxd7A6GHKUHe827STp-PP8A284rCg6M2Ld6okCWCIwuMPOr6PLFxfDWFC995oeTeCQQauGhy_Iq9QsJulIsuFmDGZMojVeUI0bmiWjIR7dejjIzreQzPcUDEKCx1SRwQMgxMw/w400-h185/Screenshot_20211117_152110.png" width="400" /></a></div>This gives you a directory structure, that just needs to be copied to the corresponding directories ...<div><br /></div><div><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">cd synology-drive-client-12682.x86_64
sudo cp -R * /<br /></pre></div></div><div><br /></div><div>and that's it.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivSwaOiOgK7bDDQpUytE5qmonakvSEh7ffIIkpn3ZGqTWYvXCxgThRxX4gUpABTMTal8lhNlYXdEzluBSoUAly578U3Y2Y7RGI_sgmy5NIEpTBBKiizmdJugezGYS1dxSju1PHAIKi9Q/s973/Screenshot_20211117_152823.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="622" data-original-width="973" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivSwaOiOgK7bDDQpUytE5qmonakvSEh7ffIIkpn3ZGqTWYvXCxgThRxX4gUpABTMTal8lhNlYXdEzluBSoUAly578U3Y2Y7RGI_sgmy5NIEpTBBKiizmdJugezGYS1dxSju1PHAIKi9Q/s320/Screenshot_20211117_152823.png" width="320" /></a></div><br /><p>That works fine, I haven't had any issues until now.</p><p><br /></p><p></p></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-14205554835702735552021-10-11T07:49:00.006-07:002022-09-15T06:50:11.755-07:00Clone a pluggable Database with APEX and connect to ORDS<p>Update: this is still valid for ORDS-versions up to 21.x. With ORDS 22.x, this got a bit easier. I created a newer cookbook under <a href="https://arnes-stuff.blogspot.com/2022/09/clone-pluggable-database-with-apex-and.html" target="_blank">Clone a pluggable Database with APEX and connect to ORDS 22.x</a>.</p><p>---8<-----------------------------------------------------------------------------</p><p>Sometimes I quickly need another test/dev environment for Apex. There are several ways to get one: snapshot or clone the VM, create one with Liquibase or clone the PDB and link the ORDS to it as described below. This is meant as a short cookbook, find more detailed information on the sites from <a href="https://www.thatjeffsmith.com/archive/2020/02/sql-developer-web-for-2-or-more-databases/" target="_blank">Jeff Smith</a> or <a href="https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-configure-multiple-databases" target="_blank">Oracle-Base</a>.</p><p>Start by connecting to your CDB and create a clone of the PDB where Apex is installed.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #0000aa;">create</span> pluggable <span style="color: #0000aa;">database</span> orclpdb2 <span style="color: #0000aa;">from</span> orclpdb
file_name_convert = (<span style="color: #aa5500;">'/orclpdb/'</span>, <span style="color: #aa5500;">'/orclpdb2/'</span>);
<span style="color: #0000aa;">alter</span> pluggable <span style="color: #0000aa;">database</span> orclpdb2 <span style="color: #0000aa;">open</span>;
sho pdbs
<span style="color: #0000aa;">alter</span> <span style="color: #0000aa;">session</span> <span style="color: #0000aa;">set</span> container=orclpdb2;
<span style="color: #0000aa;">select</span> * <span style="color: #0000aa;">from</span> apex_release;
</pre></div>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO7MM-UtQWsEvFUOYsilwWH634CuGwvKHHNb4GmMhedMulC0WxEt5ce6jJuRpBOOXCJdwRvswjYtoFVhoev6owPUkfGWijR8-X3UL7EOTr3uIReRO4IkM1MXeHYazBcKdtW06Wn3YlXA/s488/2021-10-06+12_47_03-OL8+DBDev+%2528Vor+ORDS+21.3%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="488" data-original-width="487" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO7MM-UtQWsEvFUOYsilwWH634CuGwvKHHNb4GmMhedMulC0WxEt5ce6jJuRpBOOXCJdwRvswjYtoFVhoev6owPUkfGWijR8-X3UL7EOTr3uIReRO4IkM1MXeHYazBcKdtW06Wn3YlXA/s320/2021-10-06+12_47_03-OL8+DBDev+%2528Vor+ORDS+21.3%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="319" /></a></div>Double check, that the new PDB has a valid APEX version installed. So much for for the database, we are already done here.<div>Now all we have to do is to tell ORDS about the 2nd PDB. First we need to configure the DB with</div><div><br />
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">java -jar ords.war setup --database orclpdb2
</pre></div>
</div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbF7EuysuT-W9Pk5oiRIwXHGbrA3Un9m2hbz5aRla8y8YRJCIucFcsS7ctoyqZLh3Gybm0RDfEkvrDO9mWYDgLlU7ofLdx5qyur1gHRM-ywgSY2rNOgFR_c-MOV7c-uVZ65CjwOWIGCw/s1173/2021-10-11+13_00_41-.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="603" data-original-width="1173" height="330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbF7EuysuT-W9Pk5oiRIwXHGbrA3Un9m2hbz5aRla8y8YRJCIucFcsS7ctoyqZLh3Gybm0RDfEkvrDO9mWYDgLlU7ofLdx5qyur1gHRM-ywgSY2rNOgFR_c-MOV7c-uVZ65CjwOWIGCw/w640-h330/2021-10-11+13_00_41-.png" width="640" /></a></div>Finally we need to define an URL mapping where to find the newly added PDB:</div><div><br /><div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">java -jar ords.war map-url --type base-path /orclpdb2 orclpdb2
</pre></div>
<br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7dZCYTBYDnzKXejF8XLySwUde6_eVBA7K9vSM5Rs8r6JZvpf-LNEX6h_UPZh3ayS6SfssMdEqQ8RDFmq4r1GyIhs5hsy3S4pec9J_LZ8YrwK9VLXiSVZz2na2oJvpFTxkex125r_wYw/s830/2021-10-11+13_44_43-OL8+DBDev+%2528Vor+2nd+DB+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="72" data-original-width="830" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7dZCYTBYDnzKXejF8XLySwUde6_eVBA7K9vSM5Rs8r6JZvpf-LNEX6h_UPZh3ayS6SfssMdEqQ8RDFmq4r1GyIhs5hsy3S4pec9J_LZ8YrwK9VLXiSVZz2na2oJvpFTxkex125r_wYw/w640-h56/2021-10-11+13_44_43-OL8+DBDev+%2528Vor+2nd+DB+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div><div>And that is all, restart your ORDS</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKQ9o45srSP0WLK31B3mCCCZtVWsgzz1c5BsUrOkHkvy3UcJJiSWK0eBib588uLE0Ycj9_uWJ8Ww5edG3efgZocl85nQfvLdfuN6jEWoxMHuxBXQDlh8iXL3LxXOi7QPwnlLL6tPJEtA/s1082/2021-10-11+14_28_44-.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="132" data-original-width="1082" height="78" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKQ9o45srSP0WLK31B3mCCCZtVWsgzz1c5BsUrOkHkvy3UcJJiSWK0eBib588uLE0Ycj9_uWJ8Ww5edG3efgZocl85nQfvLdfuN6jEWoxMHuxBXQDlh8iXL3LxXOi7QPwnlLL6tPJEtA/w640-h78/2021-10-11+14_28_44-.png" width="640" /></a></div><div>ORDS should log the new connection. Open the new URL with your browser, in my case:</div><div><br /></div></div><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><div><div style="text-align: left;"><span style="font-family: courier;">vm:8080/ords/<u>orclpdb2</u>/apex</span></div></div></blockquote><div><div><br /></div><div>The difference between the first and all other databases for an ORDS is, that the first one is always accessible without an additional base-path (like vm:8080/ords/apex) whereas the others always need that base-path. If you want a base-path also for the first database, see this <a href="https://www.thatjeffsmith.com/archive/2020/02/sql-developer-web-for-2-or-more-databases/" target="_blank">posting from Jeff Smith</a>. </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82TlUlzm-_VI4u3xPa3qWL9sDdCE3hOQa5iWVbJnKBUTc_eL5eiTgsgXyAxEmw7-jNFKH49sNxqByo9mYwXOJxId3Dls6n8rKMYZNLO0rz7P6J2IzgW-exF-4V0MD7nAS5ei2mxoOcw/s754/2021-10-11+14_30_25-Application+Express+-+Sign+In+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="754" data-original-width="688" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82TlUlzm-_VI4u3xPa3qWL9sDdCE3hOQa5iWVbJnKBUTc_eL5eiTgsgXyAxEmw7-jNFKH49sNxqByo9mYwXOJxId3Dls6n8rKMYZNLO0rz7P6J2IzgW-exF-4V0MD7nAS5ei2mxoOcw/s320/2021-10-11+14_30_25-Application+Express+-+Sign+In+%25E2%2580%2594+Mozilla+Firefox.png" width="292" /></a></div>Apex for the second PDB should be available under that new URL.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVpcU1C5TPa8NrTZ0IuggDv4I-x743hJyCvNhvCMUfd1c0I4_1Nb1m6tUH9vF8mmVVIWctSCbpoqHSUvL_HfenPKctNrLhCeW7LBu46laZz7EzGR2FuGY4J1ebFgJgJPZUsKx_EdrrPA/s739/2021-10-11+16_35_03-Oracle+Database+Actions+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="538" data-original-width="739" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVpcU1C5TPa8NrTZ0IuggDv4I-x743hJyCvNhvCMUfd1c0I4_1Nb1m6tUH9vF8mmVVIWctSCbpoqHSUvL_HfenPKctNrLhCeW7LBu46laZz7EzGR2FuGY4J1ebFgJgJPZUsKx_EdrrPA/w400-h291/2021-10-11+16_35_03-Oracle+Database+Actions+%25E2%2580%2594+Mozilla+Firefox.png" width="400" /></a></div>And there is also a second Database Actions / SQLDeveloper Web under that new URL pattern.</div><div><br /></div><div>This is done in less than 5 minutes and depending on your environment, this might be faster than cloning the complete VM. And dropping it only takes seconds, what also might be faster than restoring a snapshot of your VM.<br /><div><br /></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-65546066553124562392021-08-19T05:35:00.012-07:002022-05-20T05:56:40.163-07:00Out-of-Place updating the Developer VM Oracle Database to 19.12<p>This is an update to my <a href="https://arnes-stuff.blogspot.com/2021/07/out-of-place-updating-developer-vm.html">post on out-of-place patching to 19.11</a>. The mechanism is identical, but I added a few steps, so better use this one.</p><p>In my last post "<a href="https://arnes-stuff.blogspot.com/2021/02/enabling-blockchain-tables-and-sql.html" target="_blank">Enabling Blockchain Tables and SQL Table Macros with 19.10 Patch for the Developer VM Database</a>", I described how to update the Database via OPatch. Now 19.11. and 19.12. do not have that much <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/newft/ru-19.12-features.html" target="_blank">new features</a> for developers, this post is only to show how to use out-of-place updating alternatively. Find more information on this on <a href="https://mikedietrichde.com/2021/04/22/oracle-19c-installation-with-19-11-0-ru-ojvm-and-some-other-fixes/" target="_blank">Mike Dietrich's Blog</a>, I will only cover what I need to update the Developer VM.</p><p>Create a new directory for the new database home, in my case</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">mkdir /u01/app/oracle/product/19.12.0/dbhome_3
</pre><pre style="line-height: 125%; margin: 0px;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;"><span style="color: #007020;">cd</span> /u01/app/oracle/product/19.12.0/dbhome_3/</pre><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">unzip ~/ddrive/Install/Linux-x64/LINUX.X64_193000_db_home.zip</pre></pre></div>
<p>As for the first installation, get the <a href="https://www.oracle.com/database/technologies/oracle-database-software-downloads.html" target="_blank">Oracle Database 19c 19.3.0 Base Release</a> and unpack it to that directory. </p><p>Create a separate directory for the patch like</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">mkdir /u01/app/oracle/patches/32904851
</pre></div>
<p>Get patch <a href="https://support.oracle.com/epmos/faces/ui/patch/PatchDetail.jspx?parent=DOCUMENT&sourceId=2773670.1&patchId=32904851" style="outline-width: 0px; user-select: auto;" target="_blank">#32545013</a> for the 19.11 RU and unpack it to that directory. That needs at least OPatch 12.2.0.1.24. Get the latest OPatch via <a href="https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=6880880" target="_blank">Patch 6880880</a> (which is .27 at the time of writing). </p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">mv OPatch OPatch.old
unzip ~/ddrive/Install/Linux-x64/opatch-12-2-0-1-27-p6880880_210000_Linux-x86-64.zip
</pre></div>
<p>Rename the OPatch directory to something like OPatch.old, create a new OPatch directory and unzip Patch 6880880 to that.</p><p>As we are running OEL 8.x, we need to give the installer a little hint</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">export CV_ASSUME_DISTID=OEL7.8
</pre></div>
<p>Now we can go to the newly created ORACLE_HOME and run the installer. Better unset all variables pointing to the old home.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">unset ORABASE_EXEC
unset ORACLE_HOME
unset ORAHOME</pre><pre style="line-height: 125%; margin: 0px;">cd /u01/app/oracle/product/19.12.0/dbhome_3
./runInstaller -applyRU /u01/app/oracle/patches/32545013/
</pre></div>
<p>This will apply the 19.12 RU during the install. If you need any specific one-off patches, these can be applied using the "-applyOneOffs" option, see <a href="https://mikedietrichde.com/2021/04/22/oracle-19c-installation-with-19-11-0-ru-ojvm-and-some-other-fixes/" target="_blank">Mike Dietrich's Blog</a>. Click through the installer and choose only to install the software without creating a new database.</p><p>After the installer has finished, modify /etc/oratab to point to the new ORACLE_HOME</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFwMfv0PXLbD9d1wBWz_gHzk7RDBDWlQ9N0U3mrBrtskx1lWEZBlbCIM_1xZRjPJ7LuDv7PNjhpaP__3pt2WRWLXEWsWqmezOYkcrcgQkRIiIlkV0PAiXh-fbOaUbuJRwPiMcvYHa0Gg/s652/2021-07-26+17_25_51-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="433" data-original-width="652" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFwMfv0PXLbD9d1wBWz_gHzk7RDBDWlQ9N0U3mrBrtskx1lWEZBlbCIM_1xZRjPJ7LuDv7PNjhpaP__3pt2WRWLXEWsWqmezOYkcrcgQkRIiIlkV0PAiXh-fbOaUbuJRwPiMcvYHa0Gg/w400-h266/2021-07-26+17_25_51-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div>Copy the contents from /u01/app/oracle/product/19.0.0/dbhome_1/dbs to /u01/app/oracle/product/19.12.0/dbhome_2/dbs . Also copy the contents of /u01/app/oracle/product/19.0.0/network/admin to /u01/app/oracle/product/19.0.12/network/admin .</div>Change the ORACLE_HOME variable in .bashrc and /etc/oratab to point to the new home. <div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCnR1jYd7ZLT8b2rjcPJVOpEEXFFHc-ma3o5q2keoyPzyu8_xQ1RHO-dy4edLrKTgSK_Yotwef3BD2Da1znJTjghYBSF3RGKCu0JtyYoePU32hazvNOJF17mJdXqSNW8fOSw7vvP-VMQ/s611/2021-08-19+14_29_27-OL8+DBDev+%2528Vor+Catproc%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em; outline-width: 0px; user-select: auto;"><img border="0" data-original-height="174" data-original-width="611" height="114" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCnR1jYd7ZLT8b2rjcPJVOpEEXFFHc-ma3o5q2keoyPzyu8_xQ1RHO-dy4edLrKTgSK_Yotwef3BD2Da1znJTjghYBSF3RGKCu0JtyYoePU32hazvNOJF17mJdXqSNW8fOSw7vvP-VMQ/w400-h114/2021-08-19+14_29_27-OL8+DBDev+%2528Vor+Catproc%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>Source .bashrc double check the environment variables. Start the listener and the database. Finally run the data patch.<div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">cd $ORACLE_HOME/OPatch
./datapatch -verbose
</pre></div>
<div><br /></div><div>As this is meant to be a VM for testing and development, it makes sense to also enable the optimizer patches. Mike Dietrich wrote some interesting articles on this, for more information, go directly to <a href="https://mikedietrichde.com/?s=dbms_optim_bundle" target="_blank">his Blog</a>.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">execute</span> dbms_optim_bundle<span style="color: #6600ee; font-weight: bold;">.</span>enable_optim_fixes(<span style="background-color: #fff0f0;">'ON'</span>,<span style="background-color: #fff0f0;">'BOTH'</span>, <span style="background-color: #fff0f0;">'YES'</span>);
</pre></div>
<div><br /></div><div>For earlier versions, we would need an extra step. But on 19.12, all we need to enable the optimizer patches is to run rbms_optim_bundle.enable_optim_fixes. </div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #333333;">@?/</span>rdbms<span style="color: #333333;">/</span><span style="color: #008800; font-weight: bold;">admin</span><span style="color: #333333;">/</span>dbmsoptim<span style="color: #6600ee; font-weight: bold;">.</span>sql
<span style="color: #333333;">@?/</span>rdbms<span style="color: #333333;">/</span><span style="color: #008800; font-weight: bold;">admin</span><span style="color: #333333;">/</span>prvtoptim<span style="color: #6600ee; font-weight: bold;">.</span>plb
</pre></div>
<div><br /></div><div>If you get an error, because rdbms_optim_bundle is not valid, first run both above scripts and run enable_optim_fixes again.</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWyKtFGDxJRdzRSTtk_59FHDZxTC8o7DCrohDHWLLPsRJ1p1igjFGXNWreZwjR2bX5y-6LtfUYfRjNVM3uNWjdyv1gDPkkJqFBxH8zx3rtSWHo1j2JM9G7eNxz22YJUHgocb80aUAxWA/s655/2021-07-26+17_42_01-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="655" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWyKtFGDxJRdzRSTtk_59FHDZxTC8o7DCrohDHWLLPsRJ1p1igjFGXNWreZwjR2bX5y-6LtfUYfRjNVM3uNWjdyv1gDPkkJqFBxH8zx3rtSWHo1j2JM9G7eNxz22YJUHgocb80aUAxWA/w400-h138/2021-07-26+17_42_01-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>Have fun with 19.12.<br /><p>And if you are really sure, not to go back to the old version (better wait a few days), do not forget to run .../deinstall/deinstall from the old ORACLE_HOME.</p><p><br /></p><p><br /></p></div></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-73411776923170702322021-07-30T05:52:00.009-07:002022-05-20T05:57:26.743-07:00How to upgrade Apex 20.2 to 21.2 and get Database Actions on-premise.<p> This howto is based on my Oracle Developer VM project. To get from the previous Apex version 20.2 to 21.2 is a two step procedure. Install 21.1 over 20.2 and then add Patch Set Bundle 32598392 on top.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi27vc6Fi66gZkPupDgrBeMweQDB0fXI6lSUKcR73FGUOsqquLbaXwc1vIDBh-nlLaW98aNmczmQrTfNB-ztT6iQiWHdFDskUn4-4YK5249WqJzmLrQjMQj9u1QfkKwXdflushau6kyxQ/s871/2021-07-28+15_35_27-OL8+DBDev+%2528DB+19.11%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="365" data-original-width="871" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi27vc6Fi66gZkPupDgrBeMweQDB0fXI6lSUKcR73FGUOsqquLbaXwc1vIDBh-nlLaW98aNmczmQrTfNB-ztT6iQiWHdFDskUn4-4YK5249WqJzmLrQjMQj9u1QfkKwXdflushau6kyxQ/w640-h269/2021-07-28+15_35_27-OL8+DBDev+%2528DB+19.11%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>Double check the previous version. If you have followed my Oracle Developer VM series, it should be 20.2. Then<div><ul style="text-align: left;"><li>Download Apex 21.1 and the PSU from <a href="https://www.oracle.com/tools/downloads/apex-downloads.html">apex.oracle.com</a></li><li>Unpack apex_21.1.zip to a new directory</li><li>Change to the new apex directory</li></ul><div>According to the Oracle <a href="https://docs.oracle.com/en/database/oracle/application-express/21.1/htmig/performing-pre-installation-tasks-for-apex.html#GUID-0ADB0A81-B1DC-4C6B-9F2E-4A3043B1EA91" target="_blank">documentation</a>, the database needs to be shut down, then the application server (ORDS in our case) needs also to be shut down, then the database can be restarted. As I use my VM as a single user, I leave the database running. According to <a href="http://dgielis.blogspot.com/2021/06/upgrading-oracle-apex-has-never-been.html" target="_blank">Dimitri Gielis Blog</a>, even the ORDS could be left running, but I shut down ORDS in this example.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnzaMqtyRmk59yVb5V_qSja3PLNUYpfh8yqwpUEmFnBIJiVW-W7xEHQK9FeOn2siqC2RBfM8IVKkQojkzodzEGRYe9OmFmlTjrojW_wcprhvqrGYm32gtBy4zvMkfuiSUotw486ZNlfg/s654/2021-07-28+16_47_27-OL8+DBDev+%2528Vor+L%25C3%25B6schen+19.03+Home%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="296" data-original-width="654" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnzaMqtyRmk59yVb5V_qSja3PLNUYpfh8yqwpUEmFnBIJiVW-W7xEHQK9FeOn2siqC2RBfM8IVKkQojkzodzEGRYe9OmFmlTjrojW_wcprhvqrGYm32gtBy4zvMkfuiSUotw486ZNlfg/w640-h290/2021-07-28+16_47_27-OL8+DBDev+%2528Vor+L%25C3%25B6schen+19.03+Home%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>Connect to the PDB as sys</div><div><div class="separator" style="clear: both; text-align: center;"><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">@apexins.<span style="color: blue;">sql</span> SYSAUX SYSAUX TEMP /i/
</pre></div>
<div><br /></div>Run the Apex installer as like shown in the <a href="https://docs.oracle.com/en/database/oracle/application-express/21.1/htmig/downloading-installing-apex.html#GUID-7E432C6D-CECC-4977-B183-3C654380F7BF" target="_blank">documentation</a>.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibWtZDIIBmsStwIcLzUc6_vIhT-KWxnTD_VqKEBVhzuLh2h1BpAYev_8HlDstcDtdMmvEazuBgsPxCg757R4am4Yq9KItGWzm-RY0c8L0N1vB6_MeSYSovDWFl1G3XqtR3fulNDbv1rA/s823/2021-07-28+17_33_27-OL8+DBDev+%2528Vor+L%25C3%25B6schen+19.03+Home%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="456" data-original-width="823" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibWtZDIIBmsStwIcLzUc6_vIhT-KWxnTD_VqKEBVhzuLh2h1BpAYev_8HlDstcDtdMmvEazuBgsPxCg757R4am4Yq9KItGWzm-RY0c8L0N1vB6_MeSYSovDWFl1G3XqtR3fulNDbv1rA/w640-h354/2021-07-28+17_33_27-OL8+DBDev+%2528Vor+L%25C3%25B6schen+19.03+Home%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>After about 15 minutes that should be done.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">[oracle@orcldevvm-ol8 apex]$ cd /u01/apex</pre></pre><pre style="line-height: 125%; margin: 0px;">[oracle@orcldevvm-ol8 apex]$ mv images images.20.2
[oracle@orcldevvm-ol8 apex]$ cp -R /u01/patches/apex/images/ .
</pre></div>
<div><br /></div><div>As the <a href="https://docs.oracle.com/en/database/oracle/application-express/21.1/htmig/configuring-ords.html#GUID-C070563B-2080-4DB1-A5FB-48B4D1B57D77" target="_blank">documentation</a> reads, we need to copy the images directory to the Apex installation directory. I prefer to keep the old data for a while, though this should not be necessary.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv8tgZYl7h6DKrhRN8ufXIPSAF4BxLzzWArDgI63HpuIEoS9CM8CG4eZvQ9WwRU91ELz31RbBSGRoyBbEvn4UYzKx6YalDqQogFWVKDJpNPxw39kONVEPUgMWP7YHmx6eETkuC1FOzfw/s478/2021-07-30+11_30_57-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="103" data-original-width="478" height="69" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv8tgZYl7h6DKrhRN8ufXIPSAF4BxLzzWArDgI63HpuIEoS9CM8CG4eZvQ9WwRU91ELz31RbBSGRoyBbEvn4UYzKx6YalDqQogFWVKDJpNPxw39kONVEPUgMWP7YHmx6eETkuC1FOzfw/s320/2021-07-30+11_30_57-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div><div>Check the Apex Version.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_DwmtJGYbdhkNrPfyPlX0RgpwjIGT0bRDCqRGIvRafExHZlZoL6Dh3r-YGlRFIu5qESlWCZ8eaH2WMAdE0Jcxpng-JEk83QCkKc6i9-WsXup9bq9oOtsyexULH7JvYu5AFByFsy1zWg/s843/2021-07-28+17_54_14-OL8+DBDev+%2528Vor+L%25C3%25B6schen+19.03+Home%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="350" data-original-width="843" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_DwmtJGYbdhkNrPfyPlX0RgpwjIGT0bRDCqRGIvRafExHZlZoL6Dh3r-YGlRFIu5qESlWCZ8eaH2WMAdE0Jcxpng-JEk83QCkKc6i9-WsXup9bq9oOtsyexULH7JvYu5AFByFsy1zWg/w640-h266/2021-07-28+17_54_14-OL8+DBDev+%2528Vor+L%25C3%25B6schen+19.03+Home%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>If you want to double-check, startup ORDS and login to the internal workspace to check the Apex version. It should read 21.1.0 now, so far, so good. Shutdown ORDS again.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzEv0uNqh6ws02gWDRRb9eK5s6zZZ3J5WyiO4WNcfxbCBP5jDlnNlTGk7IWbqsr3jhWHAeRJXPYUajXt1wVSpxlWhMgogW-6p1ov_wXVUbYhFVwhT9lg3sMmRCJZsCUuPWmK_UFLifMQ/s590/2021-07-30+11_19_48-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="211" data-original-width="590" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzEv0uNqh6ws02gWDRRb9eK5s6zZZ3J5WyiO4WNcfxbCBP5jDlnNlTGk7IWbqsr3jhWHAeRJXPYUajXt1wVSpxlWhMgogW-6p1ov_wXVUbYhFVwhT9lg3sMmRCJZsCUuPWmK_UFLifMQ/w400-h143/2021-07-30+11_19_48-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div><div>The <a href="https://docs.oracle.com/en/database/oracle/application-express/21.1/htmig/upgrading_from_previous_oracle_application_expressr_release.html#GUID-1C9FFC9D-D0BA-4A87-82D8-2832FCE40D3D" target="_blank">documentation</a> recommends to clean up the old APEX schemas. So we need to get rid of the APEX_200200 schema.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">session</span> <span style="color: #008800; font-weight: bold;">set</span> <span style="color: #aa6600;">"_oracle_script"</span><span style="color: #333333;">=</span><span style="color: #008800; font-weight: bold;">true</span>;
<span style="color: #008800; font-weight: bold;">drop</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_200200 <span style="color: #008800; font-weight: bold;">cascade</span>;
</pre></div>
<div><br /><div>Because the Apex schemas are administrative users, this can only be run in administrative mode.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">cd /u01/patches/
unzip ~/ddrive/Install/Generic/apex-21.2-p32598392_2110_Generic.zip
cd 32598392/
</pre></div>
<div><br /></div><div>Now get <a class="o-hf" href="https://support.oracle.com/epmos/faces/PatchDetail?patchId=32598392" target="_blank">Patch Set Bundle for Oracle APEX 21.1</a>, unzip it and change to that directory.<div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr0icvgIlAadZOXkykzx9ZE3t5VN8vp0I0aM65x9ZZ7EQPSkh26VEf4tU2PoKLV_mDcdaNV3fustOh9gI1g-tW7a1zUz3lYfmLh581CxF3E-8SqY4G-ekCgqfii8Ftm_6Ce-fPxEmxvw/s642/2021-07-30+11_57_37-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="642" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr0icvgIlAadZOXkykzx9ZE3t5VN8vp0I0aM65x9ZZ7EQPSkh26VEf4tU2PoKLV_mDcdaNV3fustOh9gI1g-tW7a1zUz3lYfmLh581CxF3E-8SqY4G-ekCgqfii8Ftm_6Ce-fPxEmxvw/w400-h215/2021-07-30+11_57_37-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>Connect to the PDB and run the installation script catpatch.sql</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBNXuoIF7yfHv5KQH0T0HbKT68MPedNRto4YSRceO8qLQhYSTbl66iasyHWLvFy5xK4MCWJAUXNbUQmIOZUxy9NS5JLVkk2dmovIWvQL4aEBIBcJn3OVf0oEZfLiDqMEf6UANqxRcqSQ/s679/2021-07-30+12_34_09-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="326" data-original-width="679" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBNXuoIF7yfHv5KQH0T0HbKT68MPedNRto4YSRceO8qLQhYSTbl66iasyHWLvFy5xK4MCWJAUXNbUQmIOZUxy9NS5JLVkk2dmovIWvQL4aEBIBcJn3OVf0oEZfLiDqMEf6UANqxRcqSQ/w400-h193/2021-07-30+12_34_09-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>It took only one and a half minute in my VM.</div><div><br /><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">cp -Rf images/ /u01/apex/
</pre></div>
</div><br /></div></div><div>Copy the images directory to the Apex home.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmRStkTxTMHPlOSVUtKR2of0R09WiBH7W2RD4UNn4Vjyu2q-47AQ3PBZV96lFcgnmIZed8AqKbWgWT3GCI5JZerNOfDdrXYzIoJydbtQoDRh77f4etN-nvD2GJn8u69OMZuHFo86LDMA/s480/2021-07-30+13_21_14-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="120" data-original-width="480" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmRStkTxTMHPlOSVUtKR2of0R09WiBH7W2RD4UNn4Vjyu2q-47AQ3PBZV96lFcgnmIZed8AqKbWgWT3GCI5JZerNOfDdrXYzIoJydbtQoDRh77f4etN-nvD2GJn8u69OMZuHFo86LDMA/w400-h100/2021-07-30+13_21_14-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div>Again check the Apex version.</div><div><br /></div><div>Get the latest ORDS software from the <a href="https://www.oracle.com/database/technologies/appdev/rest-data-services-downloads.html" target="_blank">download site</a> and unpack it to the ords installation directory (eg. /u01/ords). Go to that directory and according to the <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/20.4/aelig/installing-REST-data-services.html#GUID-6F7B4E61-B730-4E73-80B8-F53299123730" target="_blank">documentation</a>, run the update with</div><div> </div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">java -jar ords.war install advanced
</pre></div>
<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLEQFQak6POLWlNaXdPE3y6yKUZRgJIksdCkYlB7JfhimLMGWj0dD8SSoncvmj6jUsIWhVUDGJf48oTYTjOXkWn3NC5UN4tPzw-aFkazAbIIKe9B5D_KGmYCQ4wLjPoI8DXHrrd3biPg/s821/2021-09-03+16_30_37-OL8+DBDev+%2528Vor+ORDS+21.1%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="472" data-original-width="821" height="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLEQFQak6POLWlNaXdPE3y6yKUZRgJIksdCkYlB7JfhimLMGWj0dD8SSoncvmj6jUsIWhVUDGJf48oTYTjOXkWn3NC5UN4tPzw-aFkazAbIIKe9B5D_KGmYCQ4wLjPoI8DXHrrd3biPg/w640-h368/2021-09-03+16_30_37-OL8+DBDev+%2528Vor+ORDS+21.1%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>Enter the correct location of the configuration data from the previous installation, in my case /u01/ords/params/ . The rest is just entering passwords and go with the defaults.<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG4gpiy-TgE95JLZT306g9B-MEICFRwjcsPQrYgxRg80t8grg3HLe10ioUe_gfTnJHt0ShZW-SiGNLnDrXp9aQzunOl_OlgjaQettEOVdHV4AuDigDsRtlxfkKJ2tMKoQMyuauNkupuQ/s766/2021-07-30+14_17_38-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="766" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG4gpiy-TgE95JLZT306g9B-MEICFRwjcsPQrYgxRg80t8grg3HLe10ioUe_gfTnJHt0ShZW-SiGNLnDrXp9aQzunOl_OlgjaQettEOVdHV4AuDigDsRtlxfkKJ2tMKoQMyuauNkupuQ/w640-h290/2021-07-30+14_17_38-OL8+DBDev+%2528Vor+Apex+21.2+Patch%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div><div>After restarting the ORDS, the new version number should show up on the Apex Web-UI.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44Tpc5dQ7YmCqE4H91CasZp2vutEVeX26QacNbRomds8sxM7H5q3SCEJ1exbJ133j-_Lyrolf5kT9Wzsa33Me5a1B9cPOZH2ILTQ3tYwjpn85_H3QBY5SdZKeuUqVmMGUXEL45iSHpQ/s1344/2021-07-30+15_09_13-.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="794" data-original-width="1344" height="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44Tpc5dQ7YmCqE4H91CasZp2vutEVeX26QacNbRomds8sxM7H5q3SCEJ1exbJ133j-_Lyrolf5kT9Wzsa33Me5a1B9cPOZH2ILTQ3tYwjpn85_H3QBY5SdZKeuUqVmMGUXEL45iSHpQ/w640-h378/2021-07-30+15_09_13-.png" width="640" /></a></div><div>Also go to http://localhost:8080/ords/sql-developer and check that you now have the Database Actions instead of SQLDeveloper Web, which is basically the same but offers more functionality.</div><div><br /></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-31499248167242406862021-07-26T08:47:00.002-07:002021-08-19T05:39:25.502-07:00Out-of-Place updating the Developer VM Oracle Database to 19.11<p>I have made a newer version of this post covering 19.12. Though this post is still valid, I made some additional hints to the new one, so better go directly to <a href="https://arnes-stuff.blogspot.com/2021/08/this-is-update-to-my-post-on-out-of.html">Out-of-Place updating the Developer VM Oracle Database to 19.12.</a></p><p>---8<-----------------------------------------------------------------------------</p><p>In my last post "<a href="https://arnes-stuff.blogspot.com/2021/02/enabling-blockchain-tables-and-sql.html" target="_blank">Enabling Blockchain Tables and SQL Table Macros with 19.10 Patch for the Developer VM Database</a>", I described how to update the Database via OPatch. Now 19.11. does not have that much <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/newft/ru-19.11-features.html" target="_blank">new features</a> for developers, this post is only to show how to use out-of-place updating alternatively. Find more information on this on <a href="https://mikedietrichde.com/2021/04/22/oracle-19c-installation-with-19-11-0-ru-ojvm-and-some-other-fixes/" target="_blank">Mike Dietrich's Blog</a>, I will only cover what I need to update the Developer VM.</p><p>Create a new directory for the new database home, in my case</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">mkdir /u01/app/oracle/product/19.11.0/dbhome_2
</pre></div>
<p>As for the first installation, get the <a href="https://www.oracle.com/database/technologies/oracle-database-software-downloads.html" target="_blank">Oracle Database 19c 19.3.0 Base Release</a> and unpack it to that directory. Create a separate directory for the patch like</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">mkdir /u01/app/oracle/patches/32545013
</pre></div>
<p>Get patch <a href="https://support.oracle.com/epmos/faces/PatchSearchResults?_adf.ctrl-state=brv0m7e4k_4&_afrLoop=120871087067989" target="_blank">#32545013</a> for the 19.11 RU and unpack it to that directory. That needs at least OPatch 12.2.0.1.24. Get the latest via <a href="https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=6880880" target="_blank">Patch 6880880</a> (which is .25 at the time of writing). Rename the OPatch directory to something like OPatch.old, create a new OPatch directory and unzip Patch 6880880 to that.</p><p>As we are running OEL 8.x, we need to give the installer a little hint</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">export CV_ASSUME_DISTID=OEL7.8
</pre></div>
<p>Now we can go to the newly created ORACLE_HOME and run the installer. Better unset all variables pointing to the old home.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">unset ORABASE_EXEC
unset ORACLE_HOME
unset ORAHOME</pre><pre style="line-height: 125%; margin: 0px;">cd /u01/app/oracle/product/19.11.0/dbhome_2
./runInstaller -applyRU /u01/app/oracle/patches/32545013/
</pre></div>
<p>This will apply the 19.11 RU during the install. If you need any specific one-off patches, these can be applied using the "-applyOneOffs" option, see <a href="https://mikedietrichde.com/2021/04/22/oracle-19c-installation-with-19-11-0-ru-ojvm-and-some-other-fixes/" target="_blank">Mike Dietrich's Blog</a>. Click through the installer and choose only to install the software without creating a new database.</p><p>After the installer has finished, modify /etc/oratab to point to the new ORACLE_HOME</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFwMfv0PXLbD9d1wBWz_gHzk7RDBDWlQ9N0U3mrBrtskx1lWEZBlbCIM_1xZRjPJ7LuDv7PNjhpaP__3pt2WRWLXEWsWqmezOYkcrcgQkRIiIlkV0PAiXh-fbOaUbuJRwPiMcvYHa0Gg/s652/2021-07-26+17_25_51-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="433" data-original-width="652" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFwMfv0PXLbD9d1wBWz_gHzk7RDBDWlQ9N0U3mrBrtskx1lWEZBlbCIM_1xZRjPJ7LuDv7PNjhpaP__3pt2WRWLXEWsWqmezOYkcrcgQkRIiIlkV0PAiXh-fbOaUbuJRwPiMcvYHa0Gg/w400-h266/2021-07-26+17_25_51-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div>Copy the contents from /u01/app/oracle/product/19.0.0/dbhome_1/dbs to /u01/app/oracle/product/19.11.0/dbhome_2/dbs .</div>Change the ORACLE_HOME variable in .bashrc to the new home. Start a new terminal and double check the environment variables.<div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_kYrSxkvXwfAJLX7yMcGRJB7MhOWEYccOeTfwJhsJsTKvl_j5IfkSq1rgZjZr2OPStkWIiU9bRj5TuczRb4bh5OQ9DN38cfruMW4Wg0wWtZmdTvv9cmuqE8ev0iJ4MztBFFCncqX4sw/s604/2021-07-26+17_34_14-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="178" data-original-width="604" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_kYrSxkvXwfAJLX7yMcGRJB7MhOWEYccOeTfwJhsJsTKvl_j5IfkSq1rgZjZr2OPStkWIiU9bRj5TuczRb4bh5OQ9DN38cfruMW4Wg0wWtZmdTvv9cmuqE8ev0iJ4MztBFFCncqX4sw/w400-h118/2021-07-26+17_34_14-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div>Start the listener and the database. Finally run the data patch.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">cd $ORACLE_HOME/OPatch
./datapatch -verbose
</pre></div>
<div><br /></div><div>Have fun with 19.11.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWyKtFGDxJRdzRSTtk_59FHDZxTC8o7DCrohDHWLLPsRJ1p1igjFGXNWreZwjR2bX5y-6LtfUYfRjNVM3uNWjdyv1gDPkkJqFBxH8zx3rtSWHo1j2JM9G7eNxz22YJUHgocb80aUAxWA/s655/2021-07-26+17_42_01-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="655" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWyKtFGDxJRdzRSTtk_59FHDZxTC8o7DCrohDHWLLPsRJ1p1igjFGXNWreZwjR2bX5y-6LtfUYfRjNVM3uNWjdyv1gDPkkJqFBxH8zx3rtSWHo1j2JM9G7eNxz22YJUHgocb80aUAxWA/w400-h138/2021-07-26+17_42_01-OL8+DBDev+%2528Vor+19.11+out+of+place+patching%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><p><br /></p><p><br /></p><p><br /></p></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-25699016540022654952021-02-22T07:28:00.008-08:002021-08-19T05:45:53.270-07:00Enabling Blockchain Tables and SQL Table Macros with Oracle 19.10 Patch<div style="text-align: left;">UPDATE: as 19.12. is available and out-of-place patching is the recommended way, skip the first part and follow this posting instead: <a href="https://arnes-stuff.blogspot.com/2021/08/this-is-update-to-my-post-on-out-of.html">Out-of-Place updating the Developer VM Oracle Database to 19.12</a></div><div style="text-align: left;"><br /></div><div style="text-align: left;">This posting is part of my <a href="https://arnes-stuff.blogspot.com/2020/05/the-oracle-database-developer-vm-project.html">Oracle Database Developer VM</a> series and shows how to add SQL Table Macros and Blockchain tables to the Database by installing the 19.10 patch and a few additional steps. The solution is not based on my own work. A few of my colleagues worked it out, it is documented on <a href="https://mikedietrichde.com/2021/02/18/oracle-database-19-10-0-and-blockchain-tables-and-compatible/" target="_blank">Mike Dietrichs</a> Blog. This post is meant to only extract what is needed for my DB VM and to have it all on one page. For more information go directly to Mikes <a href="https://mikedietrichde.com/2021/02/18/oracle-database-19-10-0-and-blockchain-tables-and-compatible/" target="_blank">article</a>. </div><h2 style="text-align: left;">Setup</h2><p><span class="kmContent" id="kmPgTpl:r1:ot71">First go to support.oracle.com and get the Database Release Update 19.10.0.0.210119 <a href="https://support.oracle.com/epmos/faces/ui/patch/PatchDetail.jspx?parent=DOCUMENT&sourceId=2725756.1&patchId=32218454" rel="noopener" target="_blank">Patch 32218454</a>. From the prerequisites in the README.html, we need Opatch version </span>12.2.0.1.<strong>23</strong> for patching to 19.10. Checking the installed version:</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">[oracle@orcldevvm-ol8 ~]<span style="color: #336699;">$ $ORACLE_HOME</span>/OPatch/opatch version
OPatch Version: 12.2.0.1.17
</pre></div>
<p>Our 19.3 standard installation only comes with 12.2.0.1.<b>17</b>. So we also need to download opatch from <a href="https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=6880880">6880880</a>. Delete or rename the old OPatch directory and replace it with the contents of this archive and check again:</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">[oracle@orcldevvm-ol8 ~]<span style="color: #336699;">$ $ORACLE_HOME</span>/OPatch/opatch version
OPatch Version: 12.2.0.1.24
</pre></div>
<p>This is just following the steps from the patch README.html. Next we need to check the prerequisites:</p><div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">[oracle@orcldevvm-ol8 32218454]<span style="color: #336699;">$ $ORACLE_HOME</span>/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.24
Copyright (c) 2021, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.24
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-02-19_08-53-08AM_1.log
Invoking prereq <span style="background-color: #fff0f0; color: #dd2200;">"checkconflictagainstohwithdetail"</span>
Prereq <span style="background-color: #fff0f0; color: #dd2200;">"checkConflictAgainstOHWithDetail"</span> passed.
OPatch succeeded.
</pre></div>
<div><br /></div><div>Looks good, so we can run opatch now. Shutdown the database as required:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">[oracle@orcldevvm-ol8 32218454]<span style="color: #336699;">$ $ORACLE_HOME</span>/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.24
Copyright (c) 2021, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.24
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-02-19_08-56-24AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 32218454
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the <span style="color: #003388;">local </span>system.
(Oracle <span style="color: #336699;">Home</span> = <span style="background-color: #fff0f0; color: #dd2200;">'/u01/app/oracle/product/19.0.0/dbhome_1'</span>)
Is the <span style="color: #003388;">local </span>system ready <span style="color: #008800; font-weight: bold;">for </span>patching? [y|n]
y
User Responded with: Y
...
Patching component oracle.jdk, 1.8.0.201.0...
Patch 32218454 successfully applied.
Sub-set patch [29517242] has become inactive due to the application of a super-set patch [32218454].
Please refer to Doc ID 2161861.1 <span style="color: #008800; font-weight: bold;">for </span>any possible further required actions.
Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-02-19_08-56-24AM_1.log
OPatch succeeded.
</pre></div>
<div><br /></div></div><div>For the datapatch we need to start up the database again and as we are on a multi tenant architecture, the PDB needs also to be opened first:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">[oracle@orcldevvm-ol8 32218454]<span style="color: #336699;">$ </span>sqlplus /nolog
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Feb 19 09:13:24 2021
Version 19.10.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
SQL> Connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 6610222304 bytes
Fixed Size 9149664 bytes
Variable Size 2550136832 bytes
Database Buffers 4043309056 bytes
Redo Buffers 7626752 bytes
Database mounted.
Database opened.
SQL> alter pluggable database all open;
Pluggable database altered.
SQL> quit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0
</pre></div>
<div><br /></div><div>To finish up the 19.10 patch, we need to run the datapatch:</div><div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">[oracle@orcldevvm-ol8 OPatch]<span style="color: #336699;">$ </span><span style="color: #003388;">cd</span> <span style="color: #336699;">$ORACLE_HOME</span>/OPatch
[oracle@orcldevvm-ol8 OPatch]<span style="color: #336699;">$ </span>./datapatch -verbose
SQL Patching tool version 19.10.0.0.0 Production on Fri Feb 19 09:15:50 2021
Copyright (c) 2012, 2020, Oracle. All rights reserved.
Log file <span style="color: #008800; font-weight: bold;">for </span>this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_14976_2021_02_19_09_15_50/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Note: Datapatch will only apply or rollback SQL fixes <span style="color: #008800; font-weight: bold;">for </span>PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
No interim patches found
Current state of release update SQL patches:
Binary registry:
19.10.0.0.0 Release_Update 210108185017: Installed
PDB CDB<span style="color: #336699;">$ROOT</span>:
Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 18-AUG-20 10.27.40.949667 AM
PDB ORCLPDB:
Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 18-AUG-20 10.35.55.137144 AM
PDB PDB<span style="color: #336699;">$SEED</span>:
Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 18-AUG-20 10.35.55.137144 AM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: CDB<span style="color: #336699;">$ROOT</span> ORCLPDB
No interim patches need to be rolled back
Patch 32218454 (Database Release Update : 19.10.0.0.210119 (32218454)):
Apply from 19.3.0.0.0 Release_Update 190410122720 to 19.10.0.0.0 Release_Update 210108185017
No interim patches need to be applied
For the following PDBs: PDB<span style="color: #336699;">$SEED</span>
No interim patches need to be rolled back
Patch 32218454 (Database Release Update : 19.10.0.0.210119 (32218454)):
Apply from 19.3.0.0.0 Release_Update 190410122720 to 19.10.0.0.0 Release_Update 210108185017
No interim patches need to be applied
Installing patches...
Patch installation complete. Total patches installed: 3
Validating logfiles...done
Patch 32218454 apply (pdb CDB<span style="color: #336699;">$ROOT</span>): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/32218454/24018797/32218454_apply_ORCL_CDBROOT_2021Feb19_09_16_38.log (no errors)
Patch 32218454 apply (pdb ORCLPDB): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/32218454/24018797/32218454_apply_ORCL_ORCLPDB_2021Feb19_09_27_46.log (no errors)
Patch 32218454 apply (pdb PDB<span style="color: #336699;">$SEED</span>): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/32218454/24018797/32218454_apply_ORCL_PDBSEED_2021Feb19_09_35_55.log (no errors)
Automatic recompilation incomplete; run utlrp.sql to revalidate.
PDBs: ORCLPDB
SQL Patching tool <span style="color: #003388;">complete </span>on Fri Feb 19 09:41:24 2021
</pre></div>
</div><div><br /></div><div>Looks good for now, but according to Mikes post ("<a href="https://mikedietrichde.com/2021/02/18/oracle-database-19-10-0-and-blockchain-tables-and-compatible/" target="_blank">Oracle Database 19.10.0 and Blockchain Tables and COMPATIBLE</a>"), there is still some work to do. First we need <a href="https://support.oracle.com/epmos/faces/PatchSearchResults?searchdata=%3Ccontext+type%3D%22BASIC%22+search%3D%22%26lt%3BSearch%26gt%3B%26lt%3BFilter+name%3D%26quot%3Bpatch_number%26quot%3B+op%3D%26quot%3Bis%26quot%3B+value%3D%26quot%3B32431413%26quot%3B%2F%26gt%3B%26lt%3BFilter+name%3D%26quot%3Bexclude_superseded%26quot%3B+op%3D%26quot%3Bis%26quot%3B+value%3D%26quot%3Bfalse%26quot%3B%2F%26gt%3B%26lt%3B%2FSearch%26gt%3B%22%2F%3E" target="_blank">patch 32431413</a> from MyOracle Support and unpack and apply this one too:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">[oracle@orcldevvm-ol8 32431413]<span style="color: #336699;">$ $ORACLE_HOME</span>/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.24
Copyright (c) 2021, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.24
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-02-19_10-17-59AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 32431413
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the <span style="color: #003388;">local </span>system.
(Oracle <span style="color: #336699;">Home</span> = <span style="background-color: #fff0f0; color: #dd2200;">'/u01/app/oracle/product/19.0.0/dbhome_1'</span>)
Is the <span style="color: #003388;">local </span>system ready <span style="color: #008800; font-weight: bold;">for </span>patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch <span style="background-color: #fff0f0; color: #dd2200;">'32431413'</span> to OH <span style="background-color: #fff0f0; color: #dd2200;">'/u01/app/oracle/product/19.0.0/dbhome_1'</span>
Patching component oracle.rdbms, 19.0.0.0.0...
Patching component oracle.rdbms.rsf, 19.0.0.0.0...
Patch 32431413 successfully applied.
Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2021-02-19_10-17-59AM_1.log
OPatch succeeded.
</pre></div>
<div><br /></div><div>Now for the tricky part: to make Blockchain Tables work, compatible has to be set to 19.10.0. But this has some implications. Carefully read <a href="https://mikedietrichde.com/2021/02/18/oracle-database-19-10-0-and-blockchain-tables-and-compatible/" target="_blank">Mike's article</a> to decide, if Blockchain Tables are worth it. For my development VM, I set the parameter, but took a VM snapshot before.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">SQL> <span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">system</span> <span style="color: #008800; font-weight: bold;">set</span> compatible=<span style="background-color: #fff0f0; color: #dd2200;">'19.10.0'</span> scope=spfile;
<span style="color: #008800; font-weight: bold;">System</span> altered<span style="color: #0000dd; font-weight: bold;">.</span>
SQL> startup <span style="color: #008800; font-weight: bold;">force</span>
ORACLE instance started<span style="color: #0000dd; font-weight: bold;">.</span>
Total <span style="color: #008800; font-weight: bold;">System</span> <span style="color: #008800; font-weight: bold;">Global</span> Area <span style="color: #0000dd; font-weight: bold;">6610222304</span> bytes
Fixed Size <span style="color: #0000dd; font-weight: bold;">9149664</span> bytes
Variable Size <span style="color: #0000dd; font-weight: bold;">2768240640</span> bytes
<span style="color: #008800; font-weight: bold;">Database</span> Buffers <span style="color: #0000dd; font-weight: bold;">3825205248</span> bytes
Redo Buffers <span style="color: #0000dd; font-weight: bold;">7626752</span> bytes
<span style="color: #008800; font-weight: bold;">Database</span> mounted<span style="color: #0000dd; font-weight: bold;">.</span>
<span style="color: #008800; font-weight: bold;">Database</span> opened<span style="color: #0000dd; font-weight: bold;">.</span>
SQL> sho parameter compatible
<span style="color: #008800; font-weight: bold;">NAME</span> <span style="color: #008800; font-weight: bold;">TYPE</span> <span style="color: #008800; font-weight: bold;">VALUE</span>
<span style="color: #888888;">------------------------------------ ----------- ------------------------------</span>
compatible string <span style="color: #0000dd; font-weight: bold;">19.10.0</span>
noncdb_compatible <span style="color: #003388;">boolean</span> <span style="color: #008800; font-weight: bold;">FALSE</span>
</pre></div>
<div><br /></div><div>So much for the setup, now let's try it out.</div><h2 style="text-align: left;">SQL Table Macros</h2><div>In 19.10, only the SQL Table Macros are available. This is not a post on SQL Macros, so I run just a very simple test</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">CREATE</span> <span style="color: #008800; font-weight: bold;">OR</span> <span style="color: #008800; font-weight: bold;">REPLACE</span> <span style="color: #008800; font-weight: bold;">FUNCTION</span> EmpDept <span style="color: #008800; font-weight: bold;">return</span> varchar2 SQL_MACRO <span style="color: #008800; font-weight: bold;">is</span>
<span style="color: #008800; font-weight: bold;">BEGIN</span>
<span style="color: #008800; font-weight: bold;">RETURN</span> q<span style="background-color: #fff0f0;">'{ </span>
<span style="background-color: #fff0f0;"> select employee_id, first_name, last_name, email, phone_number, hire_date,</span>
<span style="background-color: #fff0f0;"> job_id, salary, commission_pct, employees.manager_id emanager_id, department_name, </span>
<span style="background-color: #fff0f0;"> location_id, departments.manager_id dmanager_id</span>
<span style="background-color: #fff0f0;"> from employees, departments</span>
<span style="background-color: #fff0f0;"> where employees.department_id = departments.department_id</span>
<span style="background-color: #fff0f0;"> }'</span>;
<span style="color: #008800; font-weight: bold;">END</span>;
<span style="color: #333333;">/</span>
<span style="color: #008800; font-weight: bold;">select</span> <span style="color: #333333;">*</span> <span style="color: #008800; font-weight: bold;">from</span> EmpDept();
</pre></div>
<div><br /></div><div>In SQLDeveloper, this should result in </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrRbIqw8VMld-ALtCcYY3oqETs8yigd-Pe3gpSW1i9GFnnnkMZzHDh5XoWHm7B8_X9jybqiRjPH84qy919DarB2dwS_8UqxB1tk2F87163LwzQpVnJ79AAS5fjGqjYRKFvGTle7pdkxw/s1027/2021-02-22+12_02_30-Oracle+SQL+Developer+_+hr-orclpdb.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="570" data-original-width="1027" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrRbIqw8VMld-ALtCcYY3oqETs8yigd-Pe3gpSW1i9GFnnnkMZzHDh5XoWHm7B8_X9jybqiRjPH84qy919DarB2dwS_8UqxB1tk2F87163LwzQpVnJ79AAS5fjGqjYRKFvGTle7pdkxw/w640-h356/2021-02-22+12_02_30-Oracle+SQL+Developer+_+hr-orclpdb.png" width="640" /></a></div><h3 style="text-align: left;">Blockchain Tables</h3><div>As with SQL Table Macros, this is not a posting on Blockchain Tables, but just a simple test with 19.10. Run the following</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">CREATE</span> blockchain <span style="color: #008800; font-weight: bold;">TABLE</span> Test_Blockchain
(
id <span style="color: #003388;">NUMBER</span>,
content VARCHAR2(<span style="color: #0000dd; font-weight: bold;">128</span>)
)
<span style="color: #008800; font-weight: bold;">no</span> <span style="color: #008800; font-weight: bold;">drop</span> <span style="color: #008800; font-weight: bold;">until</span> <span style="color: #0000dd; font-weight: bold;">0</span> days idle
<span style="color: #008800; font-weight: bold;">no</span> <span style="color: #008800; font-weight: bold;">delete</span> <span style="color: #008800; font-weight: bold;">until</span> <span style="color: #0000dd; font-weight: bold;">16</span> days <span style="color: #008800; font-weight: bold;">after</span> <span style="color: #008800; font-weight: bold;">insert</span>
hashing <span style="color: #008800; font-weight: bold;">using</span> <span style="background-color: #fff0f0; color: #aa6600;">"SHA2_512"</span> <span style="color: #008800; font-weight: bold;">version</span> <span style="background-color: #fff0f0; color: #aa6600;">"v1"</span>;
<span style="color: #008800; font-weight: bold;">insert</span> <span style="color: #008800; font-weight: bold;">into</span> Test_Blockchain(id,content) <span style="color: #008800; font-weight: bold;">values</span> (<span style="color: #0000dd; font-weight: bold;">1</span>,<span style="background-color: #fff0f0; color: #dd2200;">'Oracle Blockchain Tables'</span>);
<span style="color: #008800; font-weight: bold;">select</span> * <span style="color: #008800; font-weight: bold;">from</span> Test_Blockchain;
<span style="color: #008800; font-weight: bold;">truncate</span> <span style="color: #008800; font-weight: bold;">table</span> Test_Blockchain;
</pre></div>
<div><br /></div><div>That should give you</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO3O5RQsSQBGYIh9NYvCLrm4ZwksCaulk4Qq299o0bNugJ2c3zZFAft4dYAhhyIEs6M-OpZZ8NEkh_gsNHQi1mT_ojKnXU4G2hBz4NhORqArs1UgcA_uvq9QP5lXw3jh7ekSnxvtiHmA/s834/2021-02-22+12_51_27-Oracle+SQL+Developer+_+hr-orclpdb.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="694" data-original-width="834" height="532" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO3O5RQsSQBGYIh9NYvCLrm4ZwksCaulk4Qq299o0bNugJ2c3zZFAft4dYAhhyIEs6M-OpZZ8NEkh_gsNHQi1mT_ojKnXU4G2hBz4NhORqArs1UgcA_uvq9QP5lXw3jh7ekSnxvtiHmA/w640-h532/2021-02-22+12_51_27-Oracle+SQL+Developer+_+hr-orclpdb.png" width="640" /></a></div><br /><div>The error is as expected, because we configured the Blockchain table to not allow deletes before 16 days after insert. For more information on the parameters of the create Blockchain table statement, see also <a href="https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/CREATE-TABLE.html#GUID-F9CE0CC3-13AE-4744-A43C-EAC7A71AAAB6" target="_blank">blockchain_table_clauses</a>.</div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-78854210541380375872021-02-03T07:16:00.008-08:002022-12-14T05:49:36.045-08:00The Database Developer VM: installing Apex, ORDS 21.x und SQLDeveloper Web<p>This post is part of my <a href="https://arnes-stuff.blogspot.com/2020/05/the-oracle-database-developer-vm-project.html">Oracle Developer VM Project</a> series. It is not meant to replace the official documentation in any way and what I describe is no recommended configuration. It is only meant to be a guide, if you follow my DB Developer VM Project and want to add these services to your VM.</p><p>Compared to my other posts, this is a bunch of tools to be installed in one go. The reason is that if you want ORDS and Apex, then it is the best way to install Apex first. But it won't run without ORDS, so both should be installed in one go. And SQLDeveloper Web comes for free with ORDS. But despite the number of additional tools, this is one of the shorter posts of this series.</p><p>According to the <a href="https://docs.oracle.com/en/database/oracle/application-express/20.2/htmig/apex-installation-requirements.html#GUID-13DE5DEE-DA14-491F-B0A4-39B7FB8413D0" target="_blank">documentation</a>, memory_target needs to be set to at least 300M for Apex, but in my setup the database won't start with this amount of memory. I get the following error:</p><p><span style="font-family: courier;">ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 6304M</span></p><p>So first, we will set that parameter to the required value.</p>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">system</span> <span style="color: #008800; font-weight: bold;">set</span> memory_target<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'6304M'</span> <span style="color: #008800; font-weight: bold;">scope</span><span style="color: #333333;">=</span>spfile;
startup <span style="color: #008800; font-weight: bold;">force</span>;
</pre></td></tr></tbody></table></div>
<div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">This should give you the following: </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTwcX2_-74NkkqxrkLbYX7oOSjCMJS_tX4H5cHGkuVcjSGVvP7zA0uoTdXmjjhJT-qfQm1bOii9wzbNf-YUA7RLNz8gGxH86T2UPavEpUZBV8lXOKR2WP4-Z9mwgDDTSSByKctW4Y9aA/s623/2021-02-02+14_53_56-OL8+DBDev+%2528Vor+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="403" data-original-width="623" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTwcX2_-74NkkqxrkLbYX7oOSjCMJS_tX4H5cHGkuVcjSGVvP7zA0uoTdXmjjhJT-qfQm1bOii9wzbNf-YUA7RLNz8gGxH86T2UPavEpUZBV8lXOKR2WP4-Z9mwgDDTSSByKctW4Y9aA/s320/2021-02-02+14_53_56-OL8+DBDev+%2528Vor+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div>
<span style="text-align: left;">Download the </span><a href="https://www.oracle.com/tools/downloads/apex-downloads.html" style="text-align: left;" target="_blank">Apex install bundle</a><span style="text-align: left;"> and unzip it (eg. to /u01/apex). In the unpacked folder run the installer</span><div><br /><!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">sqlplus sys/your_password@orclpdb as sysdba @apexins sysaux sysaux temp /i/
</pre></div><div><br /></div><div>Leave the session open and create the Apex Admin user by running <span style="font-family: courier;">@apxchpwd.sql</span>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ4djHJdEpjDigY_ATylNeg4Ocd2nTdasuDOcbOZEq_zAVZG3qJ2iY0gzEZatOTJkzHNJVPscVl8zmv3YuUNJ1Qsxcteejl2OkY3sD65XeDW1QVGQ-4n0l8t6yaKPr8Knv7IDaKk7P9A/s741/2021-02-02+16_01_21-OL8+DBDev+%2528Vor+Apex+Admin%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="257" data-original-width="741" height="139" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ4djHJdEpjDigY_ATylNeg4Ocd2nTdasuDOcbOZEq_zAVZG3qJ2iY0gzEZatOTJkzHNJVPscVl8zmv3YuUNJ1Qsxcteejl2OkY3sD65XeDW1QVGQ-4n0l8t6yaKPr8Knv7IDaKk7P9A/w400-h139/2021-02-02+16_01_21-OL8+DBDev+%2528Vor+Apex+Admin%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div>Unlock the APEX_PUBLIC_USER and change his password, which has been randomly set at installation</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: #007020; font-weight: bold;">alter</span> <span style="color: #007020; font-weight: bold;">user</span> apex_public_user identified <span style="color: #007020; font-weight: bold;">by</span> oracle account unlock;
</pre></div>
<div><br /></div><div>Still in the same session, run <span style="font-family: courier;">@apex_rest_config.sql</span> and set both passwords for the APEX_LISTENER user and the APEX_REST_PUBLIC_USER user.</div><div><br /></div><div>To use web services and for sending email, network services need to be enabled. Copy the following from the <a href="https://docs.oracle.com/en/database/oracle/application-express/20.2/htmig/oracle-application-express-installation-guide.pdf" target="_blank">documentation</a> and run it:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3
4
5
6
7</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #007020; font-weight: bold;">BEGIN</span>
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
<span style="color: #007020; font-weight: bold;">host</span> <span style="color: #666666;">=></span> <span style="color: #4070a0;">'*'</span>,
ace <span style="color: #666666;">=></span> xs<span style="border: 1px solid rgb(255, 0, 0);">$</span>ace_type(privilege_list <span style="color: #666666;">=></span> xs<span style="border: 1px solid rgb(255, 0, 0);">$</span>name_list(<span style="color: #4070a0;">'connect'</span>),
principal_name <span style="color: #666666;">=></span> <span style="color: #4070a0;">'APEX_200200'</span>,
principal_type <span style="color: #666666;">=></span> xs_acl.ptype_db));
<span style="color: #007020; font-weight: bold;">END</span>;
</pre></td></tr></tbody></table></div>
<div><br /></div><div>So much for the Apex part. Download the latest ORDS from <a href="https://www.oracle.com/database/technologies/appdev/rest-data-services-downloads.html">https://www.oracle.com/database/technologies/appdev/rest-data-services-downloads.html</a> and unzip the contents to your target directory (eg. /u01/ords).</div><div><br /></div><div>Go to the directory where you have unzipped ORDS and run</div><div><br />
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">java -jar ords.war
</pre></div>
</div><div><br /></div><div>ORDS will notice, that this is a first time run and will ask for some configuration parameters. In most cases, you can just accept the defaults (except for the passwords, of course). If you have followed my guide so far, the only parameters, that need to be set, are:</div><div><ul style="text-align: left;"><li>location to store configuration data => /u01/ords/params/</li><li>database service name: orclpdb</li><li>Enter the APEX static resources location:/u01/apex/images/</li></ul></div><div>After the setup, ORDS will keep running in standalone mode. We are not done yet, but give it a try to check if everything went fine so far. Open Firefox and enter http://localhost:8080, that should give you the Apex login page (as this is the first call, it will take a few seconds).<br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpTPB1N4iN3AW8ISJKCfvE_4RGfUGcugCx7elE3IsBaH53unhK8rX2qt4ZbvQTj__q02UAkTS3nLJLRNbm1HrsZgVgazFGEf5idW_0hw55Yj1yYBY_K-u2xyBfNQQOvr_d-3zp3Pt1NQ/s833/2021-02-02+18_19_39-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="708" data-original-width="833" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpTPB1N4iN3AW8ISJKCfvE_4RGfUGcugCx7elE3IsBaH53unhK8rX2qt4ZbvQTj__q02UAkTS3nLJLRNbm1HrsZgVgazFGEf5idW_0hw55Yj1yYBY_K-u2xyBfNQQOvr_d-3zp3Pt1NQ/s320/2021-02-02+18_19_39-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div><div>Following the <a href="https://docs.oracle.com/en/database/oracle/application-express/20.2/htmig/downloading-installing-ords.html#GUID-8B1CC607-D33E-41C1-AA7C-11688EC3D70F" target="_blank">documentation</a>, we need to set maxFormContentSize on startup by running </div><div><br />
<!--HTML generated using hilite.me--><div style="background: rgb(240, 240, 240); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">java -Dorg.eclipse.jetty.server.Request.maxFormContentSize<span style="color: #666666;">=</span>3000000 -jar ords.war
</pre></div>
</div><div><br /></div><div>I created a runords.sh with this line in the same directory as ords.war for starting ORDS. Looking at the ORDS terminal window, you will see the following warnings:</div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB9hL_JGGqBMo7Mu3OHmb6UTESKuo7KM2nW1wzZODsxue3Xfi6OK094xnafEfr1aaTDct6_27A-NwVR9eXb6EEmEeR5JZShbjdLHe7x1oeV3-nfS4zwnBAw5qJDgAeQIYW6ir00RXclA/s1219/2021-02-03+09_59_26-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="74" data-original-width="1219" height="38" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB9hL_JGGqBMo7Mu3OHmb6UTESKuo7KM2nW1wzZODsxue3Xfi6OK094xnafEfr1aaTDct6_27A-NwVR9eXb6EEmEeR5JZShbjdLHe7x1oeV3-nfS4zwnBAw5qJDgAeQIYW6ir00RXclA/w640-h38/2021-02-03+09_59_26-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>Though this is not a production environment, I prefer to configure the system to run without these warnings. At least it makes it easier to notice, if something really goes wrong. So I set these parameters to the recommended values from the <a href="https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/20.4/aelig/about-REST-configuration-files.html#GUID-37AA1468-DCB3-4D8B-868C-1910A0C04D68" target="_blank">documentation</a>.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEismUrTw3o4MYMykSWZhvWGkmKNKWshV_lVkDyu9pX1yHz8g3jzPe6EP4fOaeVNhS3cDxxIV_MFBfgMwUqLBDPgEarbaNNlSK8AooHgMErUkE6aQj6RG_AmqL_e0Tc7Vfj36gWwnBxSWg/s719/2021-02-03+11_17_52-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="404" data-original-width="719" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEismUrTw3o4MYMykSWZhvWGkmKNKWshV_lVkDyu9pX1yHz8g3jzPe6EP4fOaeVNhS3cDxxIV_MFBfgMwUqLBDPgEarbaNNlSK8AooHgMErUkE6aQj6RG_AmqL_e0Tc7Vfj36gWwnBxSWg/w400-h225/2021-02-03+11_17_52-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div><div>Go to /u01/ords/params/ords/ and edit defaults.xml. Add the following lines before the closing </properties>:</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(248, 248, 248); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;"><span style="color: green; font-weight: bold;"><entry</span> <span style="color: #7d9029;">key=</span><span style="color: #ba2121;">"jdbc.MaxLimit"</span><span style="color: green; font-weight: bold;">></span>20<span style="color: green; font-weight: bold;"></entry></span>
<span style="color: green; font-weight: bold;"><entry</span> <span style="color: #7d9029;">key=</span><span style="color: #ba2121;">"jdbc.InitialLimit"</span><span style="color: green; font-weight: bold;">></span>10<span style="color: green; font-weight: bold;"></entry></span>
</pre></div>
<div><br /></div><div>I also got the following error:</div><div><span style="font-family: courier;">INFO Disabling document root because the specified folder does not exist: /u01/ords/params/ords/standalone/doc_root</span></div><div>To get rid of this INFO either create that directory or edit /u01/ords/params/ords/standalone/standalone.properties and set standalone.doc.root to an existing folder.</div><div><br /></div><div>A few errors I ran into were all like</div><div>WARNING The pool named: |apex|al| is invalid and will be ignored: The username or password for the connection pool named |apex|al|, are invalid, expired, or the account is locked</div><div>Probably I messed up my passwords when running the installer. This can be fixed by setting the passwords for the following users (and unlocking them, just in case):</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;">1
2
3
4
5
6
7
8</pre></td><td><pre style="line-height: 125%; margin: 0px;"><span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> ORDS_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_LISTENER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_REST_PUBLIC_USER account unlock;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> ORDS_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_LISTENER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
<span style="color: #008800; font-weight: bold;">alter</span> <span style="color: #008800; font-weight: bold;">user</span> APEX_REST_PUBLIC_USER identified <span style="color: #008800; font-weight: bold;">by</span> oracle;
</pre></td></tr></tbody></table></div>
<div><br /></div><div>Now ORDS should come up with any errors.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimxSscLwZPZm1Vt6SyELAJFDyO3SZx2d3DiqVGXQYaQpu4YC3jd85r7ijKwSJduENopvk-6W-hCXaxfBZVpCUq3aL5r9AXEFQinw3-7du7Kyeq14DjJrpj8C2NEY6XuExygeEIQSfm7Q/s1219/2021-02-03+09_59_26-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="74" data-original-width="1219" height="38" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimxSscLwZPZm1Vt6SyELAJFDyO3SZx2d3DiqVGXQYaQpu4YC3jd85r7ijKwSJduENopvk-6W-hCXaxfBZVpCUq3aL5r9AXEFQinw3-7du7Kyeq14DjJrpj8C2NEY6XuExygeEIQSfm7Q/w640-h38/2021-02-03+09_59_26-OL8+DBDev+%2528Vor+Apex+-+ORDS%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;">Just to double check that everything is there, call http://localhost:8080/ords/sql-developer</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7P1kxbaBgdK29Cq2M4zNYjYALq8egvpLI0i94RykVD3A-4Gg2S-FZOVssxnLMjPNYdkBLQDIxrc1fQRbqMaOhuB1NNr7M4-u00oHsbtiozzKmoWhi8KZ3Q1DlhpMPW5BPNG_w2RhwcQ/s820/2021-02-03+17_51_58-Oracle+Database+Actions+_+Sign+in+%25E2%2580%2594+Mozilla+Firefox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="537" data-original-width="820" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7P1kxbaBgdK29Cq2M4zNYjYALq8egvpLI0i94RykVD3A-4Gg2S-FZOVssxnLMjPNYdkBLQDIxrc1fQRbqMaOhuB1NNr7M4-u00oHsbtiozzKmoWhi8KZ3Q1DlhpMPW5BPNG_w2RhwcQ/w400-h263/2021-02-03+17_51_58-Oracle+Database+Actions+_+Sign+in+%25E2%2580%2594+Mozilla+Firefox.png" width="400" /></a></div>Of course, you need a rest enabled schema to log in. That's it, everything is running.<br /><div class="separator" style="clear: both; text-align: left;"><br /></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-79886446694537497632021-01-21T07:13:00.008-08:002021-01-22T01:00:34.650-08:00Connect a local database to Oracle Data Safe with the on-premise adapter<div style="text-align: left;">The configuration of the Data Safe on-premise adapter requires just a few easy steps. First login into the OCI console.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj23tZ4-m2SKItGK0jIOxYAIuNiJKeV-k0hq1CbUALZZkpB8yWwVBs1uDifGdpr8sA2o-GvpLsDZXDFhw8HMVFAUoHZllExBCNIfQhv5LNUINh2nm9f91fvaSpziit8BNgpkEwBshoeFQ/s880/2021-01-14+16_08_10-Home+_+Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="374" data-original-width="880" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj23tZ4-m2SKItGK0jIOxYAIuNiJKeV-k0hq1CbUALZZkpB8yWwVBs1uDifGdpr8sA2o-GvpLsDZXDFhw8HMVFAUoHZllExBCNIfQhv5LNUINh2nm9f91fvaSpziit8BNgpkEwBshoeFQ/s320/2021-01-14+16_08_10-Home+_+Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" width="320" /></a></div><div>Open the hamburger menu and click on <i>Data Safe</i>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrr1iqXh6qv251QT1ZhiasvulvGBBBQ_xQqlP3-3E0EVAm0z01PiMNdbeNt8GZk_FlwsbyJdCp-SlMf7kgCqKC1wYTCNkLFs4BvCDW3hPZ7EkTZgfI_1EfTiMfH1yPPRqHS8LCVB51gQ/s1428/2021-01-14+16_15_52-Data+Safe+_+Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="594" data-original-width="1428" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrr1iqXh6qv251QT1ZhiasvulvGBBBQ_xQqlP3-3E0EVAm0z01PiMNdbeNt8GZk_FlwsbyJdCp-SlMf7kgCqKC1wYTCNkLFs4BvCDW3hPZ7EkTZgfI_1EfTiMfH1yPPRqHS8LCVB51gQ/w640-h266/2021-01-14+16_15_52-Data+Safe+_+Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" width="640" /></a></div><div>As you can see from the message on the top right, Data Safe is already activated for my tenant. If this is not the case for your tenant, activate Data Safe first. <br />Then click on <i>On Premises Connectors</i> on the left pane.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGobr0Ntrox6T5OEr9E4lNZ3H1FlO4ZtaInfP-Vpsb5Vg__5ce3Zi8pKO0EiH4_0vSnxtvIQGYG3vny1zFKT5qxK74ATKcPXebqrvj7i0og-LlosFQYNPh9VJ8QT60xw5u44Uar4aHyQ/s1110/2021-01-14+16_19_15-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="332" data-original-width="1110" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGobr0Ntrox6T5OEr9E4lNZ3H1FlO4ZtaInfP-Vpsb5Vg__5ce3Zi8pKO0EiH4_0vSnxtvIQGYG3vny1zFKT5qxK74ATKcPXebqrvj7i0og-LlosFQYNPh9VJ8QT60xw5u44Uar4aHyQ/w640-h192/2021-01-14+16_19_15-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" width="640" /></a></div><div>Click on <i>Create On-Premises Connector</i>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguYpvjg9fS8ygvVBYoeDqqxfE6yrVplkmtYihMzAPmYqjmGS_mxxvSEcxoRqqKKTTQiRDp1ksclbgiLGipreZ5NcM638wXkn-3L3o3iouLDftk8MUyN0gkUJMzP8HoE-EXPuh2PaoLNg/s933/2021-01-14+16_21_55-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="800" data-original-width="933" height="343" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguYpvjg9fS8ygvVBYoeDqqxfE6yrVplkmtYihMzAPmYqjmGS_mxxvSEcxoRqqKKTTQiRDp1ksclbgiLGipreZ5NcM638wXkn-3L3o3iouLDftk8MUyN0gkUJMzP8HoE-EXPuh2PaoLNg/w400-h343/2021-01-14+16_21_55-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" width="400" /></a></div><div>Give it a name, optionally a description, and click the create button.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb6SXY0Fy00foPdnzc0VagB0dIDrwqREel94SZO6s3u6taCzhtiLEGQbi-aepBXcFYwbn3pUAhI8NG8xRG6oqd61ALaorUEXCFaMELeXNYRrJ6yCUdanP3Rdxyn1tNh4tOOXVvbxX69w/s1229/2021-01-14+16_24_17-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="601" data-original-width="1229" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb6SXY0Fy00foPdnzc0VagB0dIDrwqREel94SZO6s3u6taCzhtiLEGQbi-aepBXcFYwbn3pUAhI8NG8xRG6oqd61ALaorUEXCFaMELeXNYRrJ6yCUdanP3Rdxyn1tNh4tOOXVvbxX69w/w640-h312/2021-01-14+16_24_17-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" width="640" /></a></div><div>The page already tells you, what to do next. Click the button to download the install bundle to your target machine.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGkg34m-fYQPH9spMWQRvi3zjBrOfTYR0t71DUWeuLu5baA0opRS6ERCHYi7PxzjQINEfUkCAlVbHUNc4U31BSVUQXqwp2ecTJC9OudUstEY6NyRwjHGGqx2C-NVIseuL3SINjb-HEvw/s655/2021-01-14+16_24_55-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="430" data-original-width="655" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGkg34m-fYQPH9spMWQRvi3zjBrOfTYR0t71DUWeuLu5baA0opRS6ERCHYi7PxzjQINEfUkCAlVbHUNc4U31BSVUQXqwp2ecTJC9OudUstEY6NyRwjHGGqx2C-NVIseuL3SINjb-HEvw/w400-h263/2021-01-14+16_24_55-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" width="400" /></a></div><div>Without this password, the next steps won't work. For now, we are done in the OCI console.</div><div><br /></div><div>Unpack the install bundle zip to your destination location, in my case /u01/DS-on-prem-connector/ </div><div>According to the README, we have the following requirements:</div><div><br /></div><div><div><span style="font-family: courier;"> 2a. Software Prerequisites</span></div><div><span style="font-family: courier;"> 1. Oracle Linux 7 or higher</span></div><div><span style="font-family: courier;"> 2. Python 3.5 or higher</span></div><div><span style="font-family: courier;"> -- with following dependent modules</span></div><div><span style="font-family: courier;"> -- configparser</span></div><div><span style="font-family: courier;"> -- zlib</span></div><div><span style="font-family: courier;"> 3. Valid JDK Home(JAVA_HOME)</span></div><div><span style="font-family: courier;"> -- Version 7 or higher</span></div></div><div><br /></div><div>So if any of these are missing in your environment, this is the time to fix them. Then run the setup-script as documented in the README.</div><div><br /></div>
<!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 125%; margin: 0px;">python3 setup.py install --connector-port<span style="color: #333333;">=</span>1560
</pre></div>
<div><br /></div><div>This should result in the following</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTwpvL0TbFyXkuifVzbaxmtsLg-uoXoXf8hw43QEX2kZ26O7OP6L2of1JBJ67cKsViP08TO-ITiTUgnJNQhFzBlVewtryXZKwNGeqvW_7WkuXrW77WqPvttyhNC0Omk6Jih1qENlof4w/s1239/2021-01-21+15_14_18-OL8+DBDev+%2528Vor+Connection+Manager%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="218" data-original-width="1239" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTwpvL0TbFyXkuifVzbaxmtsLg-uoXoXf8hw43QEX2kZ26O7OP6L2of1JBJ67cKsViP08TO-ITiTUgnJNQhFzBlVewtryXZKwNGeqvW_7WkuXrW77WqPvttyhNC0Omk6Jih1qENlof4w/w640-h112/2021-01-21+15_14_18-OL8+DBDev+%2528Vor+Connection+Manager%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div><div>Don't care too much abouit the 'not reachable' message, that might just be a timing issue.</div><div><br /></div><div>Before a database can be registered with Data Safe, a user with specific rights is needed. Follow the official <a href="https://docs.oracle.com/en/cloud/paas/data-safe/udscs/register-onpremises-oracle-databases-using-oracle-data-safe-onpremises-connector.html#GUID-D2DD3BA7-B312-40DA-A51F-4172487F78D3" target="_blank">documentation</a> to create such user and grant the rights that you need.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEl2Hy4O7jHIDNkdefgKleZktr852nDWcHedmyn4ocoTAgEAbmFpoCygERuQHiWlRb5Mt56UDK7uPNP8okpy5lTPnuSm5pe3TDCD5cQak5tB4svkiSPAJ_1Yrgt_myPfyai3knBSZjeQ/s1240/2021-01-21+15_20_53-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="745" data-original-width="1240" height="384" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEl2Hy4O7jHIDNkdefgKleZktr852nDWcHedmyn4ocoTAgEAbmFpoCygERuQHiWlRb5Mt56UDK7uPNP8okpy5lTPnuSm5pe3TDCD5cQak5tB4svkiSPAJ_1Yrgt_myPfyai3knBSZjeQ/w640-h384/2021-01-21+15_20_53-Oracle+Cloud+Infrastructure+%25E2%2580%2594+Mozilla+Firefox.png" width="640" /></a></div><div>Go back to your OCI console. If the icon became green and it reads <i>active</i>, everything went fine. Go up one level in the OCI console and click on <i>Service Console</i>. Then under Targets click on <i>Register</i>.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkvNl-szX9-ZReNJfO27wglXoq_QsQOCSIVGvjCVbRslMC5kg4XiN6Q0sAMk0JK3u8V9SCM6DL_MuSWnlPSjHwNQ8ycBVR_N3iQG9PgK2VtiG0BUpzBGH9Z-YuH8kxhJm-pf2Qy5-kQA/s999/2021-01-21+15_42_26-Oracle+Data+Safe+_+Targets+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="999" data-original-width="786" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkvNl-szX9-ZReNJfO27wglXoq_QsQOCSIVGvjCVbRslMC5kg4XiN6Q0sAMk0JK3u8V9SCM6DL_MuSWnlPSjHwNQ8ycBVR_N3iQG9PgK2VtiG0BUpzBGH9Z-YuH8kxhJm-pf2Qy5-kQA/w504-h640/2021-01-21+15_42_26-Oracle+Data+Safe+_+Targets+%25E2%2580%2594+Mozilla+Firefox.png" width="504" /></a></div>For Target Type choose <i>Oracle On-Premises Database and</i> for Connectivity Option choose <i>On-Premises-Connector, </i>then below select the connector you have just created. If your target machine has several IP addresses, make sure to choose the one that the Listener is listening on (check with lsnrctl stat). Enter the user credentials from the previous steps. Then click <i>Test Connection </i>and after the message 'Test connection is successfull' click on <i>Register Target</i>.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJMAE6FdjjfpxE6QUq16rmMK1vTAwolLIsu2zl9u1IfLb-L3JfuzGburfvGWO-UsmljGllsYdONX_r4v9b0uGjgYwR5rIgTWS5TVyc_gbLV8l4GS3FuzG1OC2mooPfpoJjFl5Oa7qREg/s1164/2021-01-21+15_43_47-Oracle+Data+Safe+_+Targets+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="456" data-original-width="1164" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJMAE6FdjjfpxE6QUq16rmMK1vTAwolLIsu2zl9u1IfLb-L3JfuzGburfvGWO-UsmljGllsYdONX_r4v9b0uGjgYwR5rIgTWS5TVyc_gbLV8l4GS3FuzG1OC2mooPfpoJjFl5Oa7qREg/w640-h250/2021-01-21+15_43_47-Oracle+Data+Safe+_+Targets+%25E2%2580%2594+Mozilla+Firefox.png" width="640" /></a></div>In the Data Safe Service Console under Targets, you should find your newly registered database.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi9l8hAGyMdEHsYWjB1Oe85RHDWjmuolpmHBzhmgNaKs48c8Y-8EpV7o4icds3fvWE-GJIwqWlwpeO_ubg86Fc-nEyNnsDlfD0l_L_R65vOQkxWJNjaRHRLgcyTs33GcQXtmtS6xGFKg/s1327/2021-01-21+15_45_47-Oracle+Data+Safe+_+Security+Assessment+%25E2%2580%2594+Mozilla+Firefox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="437" data-original-width="1327" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi9l8hAGyMdEHsYWjB1Oe85RHDWjmuolpmHBzhmgNaKs48c8Y-8EpV7o4icds3fvWE-GJIwqWlwpeO_ubg86Fc-nEyNnsDlfD0l_L_R65vOQkxWJNjaRHRLgcyTs33GcQXtmtS6xGFKg/w640-h210/2021-01-21+15_45_47-Oracle+Data+Safe+_+Security+Assessment+%25E2%2580%2594+Mozilla+Firefox.png" width="640" /></a></div>For a simple test run, go to Home/Security Assessement and pick your database. Click on <i>Assess Now, </i>wait for the report to finish and click <i>View Report</i>.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFj-2ifyJ2qnzkgRUC9P_C_hyphenhyphenPgaNL-d15cbi1JpRBG0rmNc9Y4rMXfQX7e2Xh0PcFHTvcoPnZ1qDIuaTIjHIGb15N0kbK6vPAOajn1J3l9VbwWE3C41fkdFJVaIbkMIwpEHHpVncaJw/s1680/2021-01-21+15_46_30-.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="865" data-original-width="1680" height="330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFj-2ifyJ2qnzkgRUC9P_C_hyphenhyphenPgaNL-d15cbi1JpRBG0rmNc9Y4rMXfQX7e2Xh0PcFHTvcoPnZ1qDIuaTIjHIGb15N0kbK6vPAOajn1J3l9VbwWE3C41fkdFJVaIbkMIwpEHHpVncaJw/w640-h330/2021-01-21+15_46_30-.png" width="640" /></a></div>Oh dear, my database has 2 high risk issues. Don't tell anyone ...<br /><div><br /><br /><div><br /></div></div>Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-75468379040148236332020-08-27T05:50:00.003-07:002020-12-15T08:20:20.905-08:00How to run a free Minecraft Server in the Oracle Cloud (3rd. Update)<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
This is an update to my older posts on how to run a Minecraft Server in the Oracle Cloud. As the OCI is constantly enhancing, I try to keep up describing the easiest way to run your Minecraft server.<br />
Best things in life are free and so could be your Minecraft server. Just get an <a href="https://www.oracle.com/cloud/free/">Always Free subsciption on the Oracle Cloud Infrastructure</a> (OCI) and follow the steps below.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPueN561aSXglYaZ8yJlrI6c3ZGgaUHvM6mhemGRTJEQUdoHgGB6M-FSnvsDQcX6r7bk9DI0G7tft3Y65Rnc3i6vHhGn7UkK8S1KDRI1pgLinFRNx5H8VWOYP_UQPXGMnEAjmsrvu6wA/s1600/2020-08-27+14_38_33-Home+_+Oracle+Cloud+Infrastructure+-+Vivaldi.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="576" data-original-width="1233" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPueN561aSXglYaZ8yJlrI6c3ZGgaUHvM6mhemGRTJEQUdoHgGB6M-FSnvsDQcX6r7bk9DI0G7tft3Y65Rnc3i6vHhGn7UkK8S1KDRI1pgLinFRNx5H8VWOYP_UQPXGMnEAjmsrvu6wA/s640/2020-08-27+14_38_33-Home+_+Oracle+Cloud+Infrastructure+-+Vivaldi.png" width="640" /></a></div>
Start at the OCI console startpage. As you can see from the small badges, a VM instance is Always Free Eligible. Choose 'Create a VM instance'.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifcQ3NNk7A94NnG4yoMsGI78-opLBivS0-Qe9W4Qg4JS7C8F5xUWg-FN02yZTBnqZE9kikyEpq3ofFzl-G6Mz13vPjtg2YX6cltMz4gHbQgcBOAC3NYieYwBgMNcJAWadXuUHtbB1dkA/s1600/2020-03-24+15_00_35-Instances+_+Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="886" data-original-width="1251" height="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifcQ3NNk7A94NnG4yoMsGI78-opLBivS0-Qe9W4Qg4JS7C8F5xUWg-FN02yZTBnqZE9kikyEpq3ofFzl-G6Mz13vPjtg2YX6cltMz4gHbQgcBOAC3NYieYwBgMNcJAWadXuUHtbB1dkA/s640/2020-03-24+15_00_35-Instances+_+Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
Give it a name and stick with the defaults. When using an Always Free machine, pick an image and machine combination that is eligible for Free Tier.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFsBrhyphenhyphenE3Z9cqyd02JqI1O7h6WeGV7hrq3P57kVFGa_2LVZoHsWo0p6haaJLNVgw4LDskqY0Ih-fpBaBcsBGJNPHbCiX1JYlEPKPUE5MKo8u8UJLSz9wzF6vNW1eUv8It89WEN6w-Jnw/s1600/2020-03-24+15_04_17-Instances+_+Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="820" data-original-width="1223" height="427" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFsBrhyphenhyphenE3Z9cqyd02JqI1O7h6WeGV7hrq3P57kVFGa_2LVZoHsWo0p6haaJLNVgw4LDskqY0Ih-fpBaBcsBGJNPHbCiX1JYlEPKPUE5MKo8u8UJLSz9wzF6vNW1eUv8It89WEN6w-Jnw/s640/2020-03-24+15_04_17-Instances+_+Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
Scroll down and adjust the shape, if needed. If this is your first project on OCI, you probably don't have a Virtual Cloud Network. The VM wizard will notice this and offers you, to create such. Give it a name and make sure that 'assign a public IP address' is checked.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9cVJke05JrTsefrwzDDEoxKE6wpuAjks50c2p9g8sfKEixbHtcJsvpfl-aBg0Do6ZpDGoJY0rgpdQUiz6BuiaBocZqUgDAsuECw1CxalrParaW4rHoZjY71gISaFMOnEsQ6a1fSVCqA/s1600/2019-06-05+12_33_08-Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="333" data-original-width="888" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9cVJke05JrTsefrwzDDEoxKE6wpuAjks50c2p9g8sfKEixbHtcJsvpfl-aBg0Do6ZpDGoJY0rgpdQUiz6BuiaBocZqUgDAsuECw1CxalrParaW4rHoZjY71gISaFMOnEsQ6a1fSVCqA/s640/2019-06-05+12_33_08-Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
Do not forget to upload your ssh public key. For the rest, leave the defaults and click 'Create'<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_7EhgxAInWZEf5GM12D1Zw586TYHwdHK_c_pgjACseLZnVJigyLwjcDJWBTU3V3CbVBHQN5smo6gegIxrrxUYf2F1UZYMW_bBbglUFu_jq_mHZvcb7jj8UODDcNecP36-3gau-J1WRw/s1600/2020-03-24+15_24_53-Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="804" data-original-width="1449" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_7EhgxAInWZEf5GM12D1Zw586TYHwdHK_c_pgjACseLZnVJigyLwjcDJWBTU3V3CbVBHQN5smo6gegIxrrxUYf2F1UZYMW_bBbglUFu_jq_mHZvcb7jj8UODDcNecP36-3gau-J1WRw/s640/2020-03-24+15_24_53-Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
You will get a long list of what OCI will do for you. Wait until it shows 'Running' and copy your public IP address.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyvHp24_6EyCtYaEBS-nCKCkepiB3tGJvrVs4lXPBxx_hg2lf9QCkqd6LzrkCMHmHjIHbV5Yn-VDsFQOQAq6fWXSWdGyMKVaJhv4Qju-Q9ue_XBnaoNY1PfFNKH1zmg_yV9oz_sd8G0g/s1600/2019-06-05+12_39_10-PuTTY+Configuration+%25281%2529.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="543" data-original-width="602" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyvHp24_6EyCtYaEBS-nCKCkepiB3tGJvrVs4lXPBxx_hg2lf9QCkqd6LzrkCMHmHjIHbV5Yn-VDsFQOQAq6fWXSWdGyMKVaJhv4Qju-Q9ue_XBnaoNY1PfFNKH1zmg_yV9oz_sd8G0g/s400/2019-06-05+12_39_10-PuTTY+Configuration+%25281%2529.png" width="400" /></a></div>
The next steps are the same as in OCI-C. Set up a ssh connection with your favorite ssh client. I use PuTTY on Windows. Paste the IP adress and save the session.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkr1q_ZobcmrzhSurC8vDm5XWWvtwFYJUw53eHE01OX68UpTSFog3MoZjxaPO8u04zai3TTtNxdNDG6lOIAvuHD2xm_Pr2KKyUisEt0BtXJ68ZbE8xOiwCX1wCtGWMfL4zlh6ZQzSbmA/s1600/2019-06-05+12_41_42-PuTTY+Configuration.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="543" data-original-width="602" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkr1q_ZobcmrzhSurC8vDm5XWWvtwFYJUw53eHE01OX68UpTSFog3MoZjxaPO8u04zai3TTtNxdNDG6lOIAvuHD2xm_Pr2KKyUisEt0BtXJ68ZbE8xOiwCX1wCtGWMfL4zlh6ZQzSbmA/s400/2019-06-05+12_41_42-PuTTY+Configuration.png" width="400" /></a></div>
Enter the Auto-login username 'opc'.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrZVtzVkdajZKwLX6TtqO3eZdWZiWd77Czl50DdVleMsQcLbUM9KHzlUax0Y8fU_vq9PssozjCNBC1nXh4vTdu55XE9hzvlQOxTYPH7sP8fqtIY_x1BNc3jm5VTsFzpDgiRIDjgv4CiQ/s1600/2019-06-05+12_43_15-PuTTY+Configuration.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="543" data-original-width="602" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrZVtzVkdajZKwLX6TtqO3eZdWZiWd77Czl50DdVleMsQcLbUM9KHzlUax0Y8fU_vq9PssozjCNBC1nXh4vTdu55XE9hzvlQOxTYPH7sP8fqtIY_x1BNc3jm5VTsFzpDgiRIDjgv4CiQ/s400/2019-06-05+12_43_15-PuTTY+Configuration.png" width="400" /></a></div>
Under Connection/SSH/Auth choose your private key file. Then save again and open your session.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2wSQ_nMfMmakHxDk82BiHkpotqL0xNjzmC-_tTahusrhbFjbfVXoUNMR-2frReuafw7Py62u5-lkwvSgmxlJKtxTg6MHMCKpzvHASWddnTgjxh9vk8UMDhnU9_rOc5_s980v5xwQ8Og/s1600/2020-03-24+15_37_00-opc%2540minecraft-vm_%257E.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="241" data-original-width="825" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2wSQ_nMfMmakHxDk82BiHkpotqL0xNjzmC-_tTahusrhbFjbfVXoUNMR-2frReuafw7Py62u5-lkwvSgmxlJKtxTg6MHMCKpzvHASWddnTgjxh9vk8UMDhnU9_rOc5_s980v5xwQ8Og/s400/2020-03-24+15_37_00-opc%2540minecraft-vm_%257E.png" width="400" /></a></div>
And here we are, hello OCI. Pull the Minecraft server directly from its publisher via (check for the version you prefer)<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="background: rgb(248, 248, 248); border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 16.25px;">wget https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar</pre>
</div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>Install the Java version you want to use, e.g.<br />
<br />
<div style="background: rgb(248, 248, 248); border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 16.25px;">sudo dnf install java-11-openjdk</pre>
</div>
<br />
Probably this will pull some other updates. Then start the server:<br />
<br />
<div style="background: rgb(248, 248, 248); border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 16.25px;">java -jar server.jar
</pre>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmOKr7xTwx8mkXdaZpkw8_m2VncNGqbOX8pWiwPdEY9sxkrcB16ms6hX0yJPOevdQTk6CpxyoPBFI4CrLZR9Aq5vwHsR7HLzOOxy_jVZfAPXy-ps4weoAA1XPwk7q9ob696Zey0_H9JA/s1600/2019-06-05+13_32_01-opc%2540Minecraft-Server_%257E.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="261" data-original-width="845" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmOKr7xTwx8mkXdaZpkw8_m2VncNGqbOX8pWiwPdEY9sxkrcB16ms6hX0yJPOevdQTk6CpxyoPBFI4CrLZR9Aq5vwHsR7HLzOOxy_jVZfAPXy-ps4weoAA1XPwk7q9ob696Zey0_H9JA/s640/2019-06-05+13_32_01-opc%2540Minecraft-Server_%257E.png" width="640" /></a></div>
After the first start, the server terminates immediately, because you have to accept the EULA first.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil_ghwJYgTq77a4ubRgN8I6m1TFP2O71EHNKqNL2njAcIinaD8E5-I0CLBGudQRRSWPuUwQoORwrfkMcIz_6wBiUuarDAfiKb5lv2I2LW8FC-GaOPblOSyoz-NLLsRaAqI3o4E2T2eIg/s1600/2019-06-05+13_34_04-opc%2540Minecraft-Server_%257E.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="261" data-original-width="845" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil_ghwJYgTq77a4ubRgN8I6m1TFP2O71EHNKqNL2njAcIinaD8E5-I0CLBGudQRRSWPuUwQoORwrfkMcIz_6wBiUuarDAfiKb5lv2I2LW8FC-GaOPblOSyoz-NLLsRaAqI3o4E2T2eIg/s640/2019-06-05+13_34_04-opc%2540Minecraft-Server_%257E.png" width="640" /></a></div>
It created a new file eula.txt. Open it in vi and change the content to eula=true.<br />
<div>
Before we start the server again, lets open the port in the Linux firewall.</div>
<br />
<div style="background: rgb(248, 248, 248); border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 16.25px;">sudo firewall-cmd --permanent --zone=public --add-port=25565/tcp
</pre>
<pre style="line-height: 16.25px;">sudo firewall-cmd --reload</pre>
</div>
</div>
<br />
As the Minecraft server has an interactive console, it should be accessible even when the SSH console has been closed in between. I prefer to the screen command for that, which can be installed by.<br />
<br />
<div style="background: rgb(248, 248, 248); border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 16.25px;">sudo yum install screen.x86_64</pre>
</div>
<br />
Then open a new screen and start the server with</div>
<br />
<div style="background: rgb(248, 248, 248); border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 16.25px;">screen -S minecraft
</pre>
<pre style="line-height: 16.25px;">java -jar server.jar</pre>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmZJ9W2cqkoUn4WMgWSZL8mFHT5U4CbLVsgLXPoATq615d4RO_i9MP1diurSYDD2jPnubD2cRjL33lH-igbzlRCUSeK2nBLhVuj0R0vAO8bm_aMxlYFj_wVU4Ovz6hdf3iM5lICSNc8Q/s1600/2019-06-05+14_36_24-%255Bscreen+0_+opc%2540Minecraft-Server_%257E%255D.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="441" data-original-width="825" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmZJ9W2cqkoUn4WMgWSZL8mFHT5U4CbLVsgLXPoATq615d4RO_i9MP1diurSYDD2jPnubD2cRjL33lH-igbzlRCUSeK2nBLhVuj0R0vAO8bm_aMxlYFj_wVU4Ovz6hdf3iM5lICSNc8Q/s400/2019-06-05+14_36_24-%255Bscreen+0_+opc%2540Minecraft-Server_%257E%255D.png" width="400" /></a></div>
With the server running, we are done with SSH. Close the screen session via CRTL-A D or just close your PuTTY window. If you want to reconnect to your Minecraft server from a new SSH session, just type<br />
<br />
<div style="background: rgb(248, 248, 248); border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 16.25px;">screen -<span style="color: green; font-weight: bold;">d</span> -<span style="color: green; font-weight: bold;">r</span> minecraft
</pre>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>Now our Minecraft server is up and running and the Linux firewall is open, so it could serve requests. But we first need to open the Minecraft port on OCI too, because by default on OCI all ports except for ssh are closed for security reasons.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFwsB3gpzOB6G0owJB-59Rn-3mEL9Jwq6amFc_3s17GpPS-EVqHMLApeF69GAJsKm6LHCNni2ONKXmOA-uKD0bk25kvPkf9kWTA-yG0tmZoKsDx4C6d9R0AUqb7I65txXpLzrZ8bN-ew/s1600/2020-03-24+16_04_07-Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="273" data-original-width="533" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFwsB3gpzOB6G0owJB-59Rn-3mEL9Jwq6amFc_3s17GpPS-EVqHMLApeF69GAJsKm6LHCNni2ONKXmOA-uKD0bk25kvPkf9kWTA-yG0tmZoKsDx4C6d9R0AUqb7I65txXpLzrZ8bN-ew/s320/2020-03-24+16_04_07-Oracle+Cloud+Infrastructure.png" width="320" /></a></div>
Back to the OCI console, open the Hamburger menu and to to <i>Networking/Virtual Cloud Networks</i>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuAG_y_lhcQu9WxxtaBZHbKKj_f9SXbLa_awYbtd3seKFSNWOSQn0tk63AOc8caSr0g3n3VuaUBRrrMrJMoOUQpHqwC1Jul2Gh23pEwtacJmaWXAP2i5Y2SeZ15vOET3ISMwxpGMc1Mw/s1600/2020-03-24+16_07_17-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="237" data-original-width="1068" height="140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuAG_y_lhcQu9WxxtaBZHbKKj_f9SXbLa_awYbtd3seKFSNWOSQn0tk63AOc8caSr0g3n3VuaUBRrrMrJMoOUQpHqwC1Jul2Gh23pEwtacJmaWXAP2i5Y2SeZ15vOET3ISMwxpGMc1Mw/s640/2020-03-24+16_07_17-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
There you shoud find a VCN with the name you gave it when creating the instance. Click on the name to open the settings.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwxeUyp2hozsgUzFVkH3Wmkp89Wf9OsUtY5vjF4rLj6eltOQwCJqiiN58NzrUGdXRWsp2ldqsJsjWlYwnB0H7Xqv__Tz_w3gKQlhGdNY3jcKQPedtMJ3asKGqyuZc5ZB-v9740n72kmA/s1600/2020-03-24+16_13_32-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="713" data-original-width="1372" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwxeUyp2hozsgUzFVkH3Wmkp89Wf9OsUtY5vjF4rLj6eltOQwCJqiiN58NzrUGdXRWsp2ldqsJsjWlYwnB0H7Xqv__Tz_w3gKQlhGdNY3jcKQPedtMJ3asKGqyuZc5ZB-v9740n72kmA/s640/2020-03-24+16_13_32-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
Click on <i>Security Lists </i>on the left under <i>Resources</i>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0nEMMILxhu9TPAm_9NPcPuVZ-MU54a6Bjgo9kq_G39KK_zNvLuhN3lgqcOpMoZ1pRSdF6YJsb11lIKR-T_NOpwZ68muV856GiDOO3ZZJORvs-z3xnyVqpN1x74Q6sxqgyZGGUQZgkJw/s1600/2020-03-24+16_16_10-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="234" data-original-width="1088" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0nEMMILxhu9TPAm_9NPcPuVZ-MU54a6Bjgo9kq_G39KK_zNvLuhN3lgqcOpMoZ1pRSdF6YJsb11lIKR-T_NOpwZ68muV856GiDOO3ZZJORvs-z3xnyVqpN1x74Q6sxqgyZGGUQZgkJw/s640/2020-03-24+16_16_10-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
Click on the Default Security List to open the settings.</div>
</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN6mpl-vxPhyphenhyphenAH2sASULt2uliGXtxolXEFDo9GERXbLFBomIwRgdR6O1WHACo0M1R-e6JBVb9RcMjetNUUjP2FXW9z1rGEdsGuCHAhIL_1w6FdOHa53sMb5d3e50LVNMp4JOpU5xOzDA/s1600/2019-06-05+14_48_04-Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="597" data-original-width="1027" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN6mpl-vxPhyphenhyphenAH2sASULt2uliGXtxolXEFDo9GERXbLFBomIwRgdR6O1WHACo0M1R-e6JBVb9RcMjetNUUjP2FXW9z1rGEdsGuCHAhIL_1w6FdOHa53sMb5d3e50LVNMp4JOpU5xOzDA/s640/2019-06-05+14_48_04-Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
From the Ingress Rules you can see, that any incoming TCP traffic, except for ssh, is blocked. So we need to add a rule for our minecraft server here.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzR2EiL495LlLj2wmtZ85SyPsz8lRd9ck2zAovTHtbrfrPX7TIRQRBwwobVmLSgxN3mHxzc_YaVZ1t56bpZ0urzJzgZchgqzWKn_pjMjbxh2yzjiZyGGho3UjI5GsNAHSS21B099eNcg/s1600/2020-03-24+16_20_48-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="586" data-original-width="699" height="335" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzR2EiL495LlLj2wmtZ85SyPsz8lRd9ck2zAovTHtbrfrPX7TIRQRBwwobVmLSgxN3mHxzc_YaVZ1t56bpZ0urzJzgZchgqzWKn_pjMjbxh2yzjiZyGGho3UjI5GsNAHSS21B099eNcg/s400/2020-03-24+16_20_48-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" width="400" /></a></div>
By clicking on 'Add Ingress Rule' we can define our rule for CIDR 0.0.0.0/0 (all internet) and the Minecraft server port 25565.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSI7w1klMyowRF66i1JYnjqWdqcRmJlscbch1ccoOvigJat_bXaKZ2Y3VNQrh-oZd3TV3gOqGxeFwgGdvO8ndL5R2Sffzxq5HJIQMbm_XcCtobJch-qLobqytfNQ04G5_ZKoE00GLU5Q/s1600/2020-03-24+16_26_23-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="572" data-original-width="1092" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSI7w1klMyowRF66i1JYnjqWdqcRmJlscbch1ccoOvigJat_bXaKZ2Y3VNQrh-oZd3TV3gOqGxeFwgGdvO8ndL5R2Sffzxq5HJIQMbm_XcCtobJch-qLobqytfNQ04G5_ZKoE00GLU5Q/s640/2020-03-24+16_26_23-Virtual+Cloud+Networks+_+Oracle+Cloud+Infrastructure.png" width="640" /></a></div>
The rule should be listed under Ingress Rules. Now we are done with the OCI setup.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE2cRnbID4Vzddz_bYTEnm5nd-DBek8tSGKRw7cgmWbRyGkNf1YFAkmWMGr_bpkYxJn3Nr94EnrPX95a-r-podBWEuVVX8SA_CSbpLagQ_wE-d6YMZt1e6nnwvOy-A2HJabHhIGAwkyA/s1600/2016-04-22+14_36_20-Minecraft+1.9.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE2cRnbID4Vzddz_bYTEnm5nd-DBek8tSGKRw7cgmWbRyGkNf1YFAkmWMGr_bpkYxJn3Nr94EnrPX95a-r-podBWEuVVX8SA_CSbpLagQ_wE-d6YMZt1e6nnwvOy-A2HJabHhIGAwkyA/s400/2016-04-22+14_36_20-Minecraft+1.9.2.png" width="400" /></a></div>
Start Minecraft and configure a new Server. Give it a name and enter the public IP address of your instance.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCGpqsQkcUXV1HBOst-ofILF7WIE0s8uwfcPYxs6fmee4R_uktzEkJs-liiAM3WHJ1ZlFSbIYJtj4qe6hIEWImMl24hD70w5xPDHREHQ5z7iaLhDwFd9HtBQIbWrQdz6NnRG58qFuYaQ/s1600/2016-04-22+14_38_26-Minecraft+1.9.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCGpqsQkcUXV1HBOst-ofILF7WIE0s8uwfcPYxs6fmee4R_uktzEkJs-liiAM3WHJ1ZlFSbIYJtj4qe6hIEWImMl24hD70w5xPDHREHQ5z7iaLhDwFd9HtBQIbWrQdz6NnRG58qFuYaQ/s400/2016-04-22+14_38_26-Minecraft+1.9.2.png" width="400" /></a></div>
Your Oracle Cloud instance will be listed in Minecrafts server list, notice the good ping. Double click to start your game.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnr50kSlCzjevlLekzF8qrVmXaPOsl_v5d1qqXrTZuCTxLszPmU_OZxBOw3LJgb-lXPYD3ey_r9kAPJfpOHAqM2GZX9UpsFPkOf8scOjgYHsRZK8BpobTiP2VBoUlz-ywW4-Z6nI-xoQ/s1600/2016-04-22+14_40_48-Minecraft+1.9.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnr50kSlCzjevlLekzF8qrVmXaPOsl_v5d1qqXrTZuCTxLszPmU_OZxBOw3LJgb-lXPYD3ey_r9kAPJfpOHAqM2GZX9UpsFPkOf8scOjgYHsRZK8BpobTiP2VBoUlz-ywW4-Z6nI-xoQ/s320/2016-04-22+14_40_48-Minecraft+1.9.2.png" width="320" /></a></div>
Have fun with the Oracle Cloud and Minecraft!<br />
<br />
BTW: this tutorial is meant to demonstrate the usage of OCI, not to do a perfect Minecraft setup. There are many tutorials to do this, like <a href="https://linuxize.com/post/how-to-install-minecraft-server-on-centos-7/" target="_blank">this one</a>.</div>
Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-88462820110068032062020-08-27T04:41:00.000-07:002020-08-27T04:41:03.476-07:00The Oracle DB Developer VM: Installing VS Code and first steps<div dir="ltr" style="text-align: left;" trbidi="on">
This post is part of my <a href="https://arnes-stuff.blogspot.com/2020/05/the-oracle-database-developer-vm-project.html">Oracle DB Developers VM</a> series. Based on the previous postings on how to set up Oracle Linux 8 with the Oracle DB on VirtualBox, this post will show how to install Visual Studio Code with the Oracle Integration in this environment on a beginners level.<br />
Gnome, in contrast to KDE, does not come with a good visual editor for developers, so we should install something better. VS Code has gained popularity and Oracle plugins are available, so I use that as an example.<br />
For installing VS Code, just follow the <a href="https://code.visualstudio.com/docs/setup/linux">official instructions</a>:<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #f8f8f8; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c <span style="color: #4e9a06;">'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'</span>
sudo dnf check-update
sudo dnf install code
sudo dnf install dotnet-sdk-2.1
</pre>
</div>
<br />
We also need to install the <a href="https://www.oracle.com/database/technologies/appdev/dotnet/install-dotnetcore-linux.html">.NET Core Runtime for Linux</a> to run the Oracle Developer Tools for VS Code. It is important to use the older version 2.1.<br />
<!-- HTML generated using hilite.me -->Double check the dotnet installation with<br />
<br />
<div style="background: #f8f8f8; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">dotnet --list-sdks
dotnet --list-runtimes
</pre>
</div>
<br />
That should return something like:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGJK2Ep-MFcFwFVTguOsq2sjvmBN9GGhX3pQvc3t7AFPk4bnhkZaUwmP3kvqxvngro__2zvHEDmuXaQrgMeqHQa2cBVEu4KxVRuUtVcQ8JnWvgIFBqUPNZhi0t0anp7FebSYMJ7wgD2g/s1600/2020-08-27+12_45_48-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="92" data-original-width="700" height="84" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGJK2Ep-MFcFwFVTguOsq2sjvmBN9GGhX3pQvc3t7AFPk4bnhkZaUwmP3kvqxvngro__2zvHEDmuXaQrgMeqHQa2cBVEu4KxVRuUtVcQ8JnWvgIFBqUPNZhi0t0anp7FebSYMJ7wgD2g/s640/2020-08-27+12_45_48-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Searching for Code should now show you VS Code in your activities<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjab8H5l9ihVfcL0NoPBHSJ6IZFmkYq3TXwTDJDKNMnVnesjxdWAs1MPes0qq3qX6khPDvXfhf0ZkPUDgq2rwf-gZ2gt0Zi1nhB3ExPU3SaT850XUfS5jzdDWY20edhUCpDbQumsxWuA/s1600/2020-08-27+11_43_31-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="299" data-original-width="494" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjab8H5l9ihVfcL0NoPBHSJ6IZFmkYq3TXwTDJDKNMnVnesjxdWAs1MPes0qq3qX6khPDvXfhf0ZkPUDgq2rwf-gZ2gt0Zi1nhB3ExPU3SaT850XUfS5jzdDWY20edhUCpDbQumsxWuA/s320/2020-08-27+11_43_31-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Moving the icon to the right into the favorites bar makes it also available in the applications menu.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4tsipfgdG2mf00w9VHcArNi5oy5YjcNovpeJgViOmpS0-50cBYCvF8JcyNELhbyLzl3c5cWWvsKeM0FXseij9rX1HpOPwb7fIhPX6for0lgvtbQjY8lWTy79SPg20d4xHU5XFkOUpug/s1600/2020-08-27+11_44_33-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="398" data-original-width="499" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4tsipfgdG2mf00w9VHcArNi5oy5YjcNovpeJgViOmpS0-50cBYCvF8JcyNELhbyLzl3c5cWWvsKeM0FXseij9rX1HpOPwb7fIhPX6for0lgvtbQjY8lWTy79SPg20d4xHU5XFkOUpug/s320/2020-08-27+11_44_33-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div>
Microsoft did not tag the .desktop file for VS Code correctly, so it does not appear in the applications menu when not put into the favorites. This can be corrected by editing <span style="font-family: "courier new" , "courier" , monospace;">/usr/share/applications/code.desktop</span> and adding <span style="font-family: "courier new" , "courier" , monospace;">;Programming</span> to the keywords section like this:<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #f8f8f8; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #ce5c00; font-weight: bold;">[</span>Desktop Entry<span style="color: #ce5c00; font-weight: bold;">]</span>
<span style="color: black;">Name</span><span style="color: #ce5c00; font-weight: bold;">=</span>Visual Studio Code
<span style="color: black;">Comment</span><span style="color: #ce5c00; font-weight: bold;">=</span>Code Editing. Redefined.
<span style="color: black;">GenericName</span><span style="color: #ce5c00; font-weight: bold;">=</span>Text Editor
<span style="color: black;">Exec</span><span style="color: #ce5c00; font-weight: bold;">=</span>/usr/share/code/code --no-sandbox --unity-launch %F
<span style="color: black;">Icon</span><span style="color: #ce5c00; font-weight: bold;">=</span>com.visualstudio.code
<span style="color: black;">Type</span><span style="color: #ce5c00; font-weight: bold;">=</span>Application
<span style="color: black;">StartupNotify</span><span style="color: #ce5c00; font-weight: bold;">=</span><span style="color: #204a87;">false</span>
<span style="color: black;">StartupWMClass</span><span style="color: #ce5c00; font-weight: bold;">=</span>Code
<span style="color: black;">Categories</span><span style="color: #ce5c00; font-weight: bold;">=</span>Utility;TextEditor;Development;IDE;
<span style="color: black;">MimeType</span><span style="color: #ce5c00; font-weight: bold;">=</span>text/plain;inode/directory;
<span style="color: black;">Actions</span><span style="color: #ce5c00; font-weight: bold;">=</span>new-empty-window;
<span style="color: black;">Keywords</span><span style="color: #ce5c00; font-weight: bold;">=</span>vscode;Programming
<span style="color: #ce5c00; font-weight: bold;">[</span>Desktop Action new-empty-window<span style="color: #ce5c00; font-weight: bold;">]</span>
<span style="color: black;">Name</span><span style="color: #ce5c00; font-weight: bold;">=</span>New Empty Window
<span style="color: black;">Exec</span><span style="color: #ce5c00; font-weight: bold;">=</span>/usr/share/code/code --no-sandbox --new-window %F
<span style="color: black;">Icon</span><span style="color: #ce5c00; font-weight: bold;">=</span>com.visualstudio.code
</pre>
</div>
<br />
and here you are:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj26qMu2Q91KbHhqr0WI9ZshrbRrmxUWxp6S4XmKpHzCHiy9vbYmPfCD16Fy1YJCEmPei1c9jEMYtpxRkTqQQWjlAYqSg3Tr8foYzuCptMmnXC03McddBBRDnNUTmD1UdkdeZYpcNkP5w/s1600/2020-08-27+11_57_53-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="330" data-original-width="435" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj26qMu2Q91KbHhqr0WI9ZshrbRrmxUWxp6S4XmKpHzCHiy9vbYmPfCD16Fy1YJCEmPei1c9jEMYtpxRkTqQQWjlAYqSg3Tr8foYzuCptMmnXC03McddBBRDnNUTmD1UdkdeZYpcNkP5w/s320/2020-08-27+11_57_53-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div>
Start VS Code, go to the extensions tab and search for Oracle.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOtCos8A_BUKvjzOHQXml5HWCrU8x4wPyc68ifrxhbJuEx806tF2Ll_qJhg_F6Wmk0uk2opGI-HqPs6d7s7zFxzz6146WwldvtGLN-WVzNv2_IZepN-hmA7-0Rn9pmdAInuJ6gy1f3Gg/s1600/2020-08-27+12_01_28-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="386" data-original-width="1079" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOtCos8A_BUKvjzOHQXml5HWCrU8x4wPyc68ifrxhbJuEx806tF2Ll_qJhg_F6Wmk0uk2opGI-HqPs6d7s7zFxzz6146WwldvtGLN-WVzNv2_IZepN-hmA7-0Rn9pmdAInuJ6gy1f3Gg/s640/2020-08-27+12_01_28-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
Choose the official one from Oracle Corporation and click on <i>Install</i>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS1Ml5T3L-yPfO7XFQ9qEqEuvQSSziLi3dI301eIb0meeOcmLrp734LAqKD-i0JdKy_BIt6VbXWmiaIPkwPMrV2HCxhtjBnvn1Celz-3M4UOuRfiJOq0aIABfv6tkneSo3ODgLSe18cA/s1600/2020-08-27+13_00_56-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="582" data-original-width="839" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS1Ml5T3L-yPfO7XFQ9qEqEuvQSSziLi3dI301eIb0meeOcmLrp734LAqKD-i0JdKy_BIt6VbXWmiaIPkwPMrV2HCxhtjBnvn1Celz-3M4UOuRfiJOq0aIABfv6tkneSo3ODgLSe18cA/s400/2020-08-27+13_00_56-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
After installation of the extension, on the left bar an Oracle DB tab will appear. Click it and in the Oracle Explorer click the plus (+) and insert your credentials.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwgt3cRiJvHcNIgQooqO8D3lsQFry-0U2bSq70BWqvBKd5GtoI2vMIu-8RtEW8OqFwWiGZTyGfV0B8ALJrEb9J-gr3rQtipb8NhP54PFpw60AQ8T6xa2zLar-YdDpmP8Wca07eJhK44Q/s1600/2020-08-27+13_04_48-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="315" data-original-width="1071" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwgt3cRiJvHcNIgQooqO8D3lsQFry-0U2bSq70BWqvBKd5GtoI2vMIu-8RtEW8OqFwWiGZTyGfV0B8ALJrEb9J-gr3rQtipb8NhP54PFpw60AQ8T6xa2zLar-YdDpmP8Wca07eJhK44Q/s640/2020-08-27+13_04_48-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
Double click the newly created connection. Click around, for example choose a table and select <i>Show Data</i>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-WQEqbV3T0FOcMNvI4AvGWjXSpOdlZM-iuhQcjU1I0VmqGqraT_jo_vWOGfyb-UPRC10IjMysBxGN8M_yRyx541dLiTP5GVpNemtRUQJ-owHHL7oUU7NIjGR2LEndja46vzthdkUTg/s1600/2020-08-27+13_09_41-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="255" data-original-width="929" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe-WQEqbV3T0FOcMNvI4AvGWjXSpOdlZM-iuhQcjU1I0VmqGqraT_jo_vWOGfyb-UPRC10IjMysBxGN8M_yRyx541dLiTP5GVpNemtRUQJ-owHHL7oUU7NIjGR2LEndja46vzthdkUTg/s640/2020-08-27+13_09_41-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
Editing stored procedures and functions also works.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLum7dDIMMvMTop39kN-avcDs92GO89VkemXk0ja9mO60xlqf23joUJkZ55cXNxF9ybMfB7aROqZQw5MgG4YE3_muzaDjxr9lsnjLjZL934BuRjrsy_lL7yHAKBY2ufKbP5JsQtROZKA/s1600/2020-08-27+13_15_09-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="391" data-original-width="660" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLum7dDIMMvMTop39kN-avcDs92GO89VkemXk0ja9mO60xlqf23joUJkZ55cXNxF9ybMfB7aROqZQw5MgG4YE3_muzaDjxr9lsnjLjZL934BuRjrsy_lL7yHAKBY2ufKbP5JsQtROZKA/s400/2020-08-27+13_15_09-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
To execute some SQL press F1 and choose Oracle: Develop New SQL or PL/SQL<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqJm-xeMm82EwzRRMgUfSM0f4USzzNLDE9y8YesFY_JZorcm_D_1owUjIlReNwKCz2YmeXBcOhX2uDpTMOp-X28ZwWRqeNwVDokWUgomzLHJWCz0cy8JwHAa3IRkWIHOZ7Isrm8NBEpQ/s1600/2020-08-27+13_17_28-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="107" data-original-width="619" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqJm-xeMm82EwzRRMgUfSM0f4USzzNLDE9y8YesFY_JZorcm_D_1owUjIlReNwKCz2YmeXBcOhX2uDpTMOp-X28ZwWRqeNwVDokWUgomzLHJWCz0cy8JwHAa3IRkWIHOZ7Isrm8NBEpQ/s400/2020-08-27+13_17_28-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
Select your connection<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcxIXnbL6Yglzi-_cPr6lwXSC6C55nSw_i3QnnjwpGacS8p-CNdSJWuecdvOSpoyqKhsdx8r0XrPUb8HkIEsFZLKifq9xLoycCNrCc9s3Z93cLFNHzswETL5iy-8A84QWVGeuzKHxrqg/s1600/2020-08-27+13_20_15-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="314" data-original-width="628" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcxIXnbL6Yglzi-_cPr6lwXSC6C55nSw_i3QnnjwpGacS8p-CNdSJWuecdvOSpoyqKhsdx8r0XrPUb8HkIEsFZLKifq9xLoycCNrCc9s3Z93cLFNHzswETL5iy-8A84QWVGeuzKHxrqg/s400/2020-08-27+13_20_15-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Type some meaningfull SQL and execute it<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs5CKGsGe3MLmbCNiRKjWwHvkiE67eC_AGhwHBULEN9TJZ3GkKI7_YiZAuaB1k0PHQL_Nbxg4xRpEWGY4pvE-962Cb69kuSfFgsk2t3WpPJ0j8Tt4MYOHat26B_1gVsaTXGBN_B-BSkw/s1600/2020-08-27+13_22_50-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="856" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs5CKGsGe3MLmbCNiRKjWwHvkiE67eC_AGhwHBULEN9TJZ3GkKI7_YiZAuaB1k0PHQL_Nbxg4xRpEWGY4pvE-962Cb69kuSfFgsk2t3WpPJ0j8Tt4MYOHat26B_1gVsaTXGBN_B-BSkw/s400/2020-08-27+13_22_50-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
That should give you the result set.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvaqIQVSsX0BOjMfb7PAYOfiJBP9pM9C46vhzuqOdo8aDzDUo3rcNWagfx8CFjeLXLrZBcyAJGYcIBl6zePDbbrpJBBTyCJIrINmE8qUBGBmlXyqIfmxVZe-mCIMS0CzdUTZc7Q5OmRA/s1600/2020-08-27+13_27_59-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="447" data-original-width="834" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvaqIQVSsX0BOjMfb7PAYOfiJBP9pM9C46vhzuqOdo8aDzDUo3rcNWagfx8CFjeLXLrZBcyAJGYcIBl6zePDbbrpJBBTyCJIrINmE8qUBGBmlXyqIfmxVZe-mCIMS0CzdUTZc7Q5OmRA/s400/2020-08-27+13_27_59-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
By choosing View->Editor Layout->Two Rows and moving the results tab into the lower part of the SQL tab, both can be displayed on one page. Of course, code completion also works.<br />
<br />
Of course, all of this works also if you install VS Code on your host OS. On Windows, just download and run the installer. The required .dotnet libraries are already part of the OS.<br />
<br />
So much for the first steps with VS Code and the Oracle extension. More information can be found on the <a href="https://www.oracle.com/database/technologies/appdev/dotnet/odtvscodequickstart.html">official Oracle page</a>.</div>
Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-767774329497585292020-08-26T03:21:00.001-07:002020-08-26T03:22:57.924-07:00The Oracle DB Developer VM: Installing SQLDeveloper <div dir="ltr" style="text-align: left;" trbidi="on">
This post is part of my Oracle DB Developers VM series. Based on the previous postings on how to set up Oracle Linux 8 with the Oracle DB on VirtualBox, this post will show how to install the Oracle SQLDeveloper 20.2 in this environment on a beginners level.<br />
Download the latest SQLDeveloper from <a href="https://www.oracle.com/tools/downloads/sqldev-downloads.html">Oracle</a>. I recommend downloading it from your host OS and put it in some directory that is accessible from your VM. I use the version for 'Other platforms', which is not platform specific.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeDCHbbXB-u8IB34iWvNgBWl0SIP7mD6PgkGEBUrNIA7-9gvECqK9H-aJRfKSSHFUK4lXnCG3tZNCsp1mhuHV665L6AMGJy4MdYIqOFZA8YENxuop2giEcnHv8drM5Ro1tGC06YJb5lg/s1600/2020-08-25+11_50_50-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="611" data-original-width="910" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeDCHbbXB-u8IB34iWvNgBWl0SIP7mD6PgkGEBUrNIA7-9gvECqK9H-aJRfKSSHFUK4lXnCG3tZNCsp1mhuHV665L6AMGJy4MdYIqOFZA8YENxuop2giEcnHv8drM5Ro1tGC06YJb5lg/s320/2020-08-25+11_50_50-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div>
Extract it to the ~/bin directory in your home, next to your sqlcl folder. Start it with<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #f8f8f8; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">~/bin/sqldeveloper/sqldeveloper.sh
</pre>
</div>
<br />
After startup you are immediately prompted to connect to one of your databases.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEvyi1IJHO1wgIGKY409Ce_RCiaCk-hAQxudN4P6qgbxbeUA6oK9nWndp3CCXU00UB5wXXDy4rwo6qwcUSSB8JorTl1Ea4U-BG-yJ-bfMMXKMpFsOhWsvHgltwQ7AlXLCu6gLUjzBAPQ/s1600/2020-08-25+11_59_06-Greenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="445" data-original-width="700" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEvyi1IJHO1wgIGKY409Ce_RCiaCk-hAQxudN4P6qgbxbeUA6oK9nWndp3CCXU00UB5wXXDy4rwo6qwcUSSB8JorTl1Ea4U-BG-yJ-bfMMXKMpFsOhWsvHgltwQ7AlXLCu6gLUjzBAPQ/s400/2020-08-25+11_59_06-Greenshot.png" width="400" /></a></div>
Choose the one you want ...<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVaNmgIMa8-GcSEEA4yOEwYYbJ8kwkQioC1buYtD_8bIxjrM7ybxCRWCuYgRMmEP_l4i43i91O60H_sI7V5rwVEqlLq0aNFb9KaUpmKAlAVLg-RKK7tP8b2MdJmckSOYEcquMAo2QkoA/s1600/2020-08-25+12_00_13-Greenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="155" data-original-width="517" height="95" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVaNmgIMa8-GcSEEA4yOEwYYbJ8kwkQioC1buYtD_8bIxjrM7ybxCRWCuYgRMmEP_l4i43i91O60H_sI7V5rwVEqlLq0aNFb9KaUpmKAlAVLg-RKK7tP8b2MdJmckSOYEcquMAo2QkoA/s320/2020-08-25+12_00_13-Greenshot.png" width="320" /></a></div>
... and enter your credentials<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibuRBPFGamri56XrnHMaVoeFysleGYc9oOfTggE-nR8SBXz0Y3kEAiyJocGC9CK10feDpggCigkpnXj6bBmiu2L7agqMWgXzbp0dJt5R5W-YE5lO2lOPOMSsAI1c4EH3ibTfQvrS7cyQ/s1600/2020-08-25+12_24_42-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="245" data-original-width="711" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibuRBPFGamri56XrnHMaVoeFysleGYc9oOfTggE-nR8SBXz0Y3kEAiyJocGC9CK10feDpggCigkpnXj6bBmiu2L7agqMWgXzbp0dJt5R5W-YE5lO2lOPOMSsAI1c4EH3ibTfQvrS7cyQ/s640/2020-08-25+12_24_42-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
It will appear on the left in the Connections-tree and is immediately available for using.</div>
<div class="separator" style="clear: both; text-align: left;">
Also add the PDB to your connection list.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifjxDM6kP8elXMzuiLKyOlZO3bESEn8GTKQrUAlt1kyMTLF1vFhPuy2Dzv2aUiPS-OS263c7YfrBsJAVdCb3-d2VWllsLelSK2_2oBmVwhgEpl94NCWGvIEGVWQhJv79VQwW-24hjpdQ/s1600/2020-08-25+12_42_40-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="497" data-original-width="829" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifjxDM6kP8elXMzuiLKyOlZO3bESEn8GTKQrUAlt1kyMTLF1vFhPuy2Dzv2aUiPS-OS263c7YfrBsJAVdCb3-d2VWllsLelSK2_2oBmVwhgEpl94NCWGvIEGVWQhJv79VQwW-24hjpdQ/s400/2020-08-25+12_42_40-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
You can either select the ORCLPDB entry from the Welcome Page or right-click on <i>Oracle Connections</i>, choose <i>New Connection</i> and fill out the dialog. To make sure that everything is correct, click <i>Test </i>before <i>Connect</i>.</div>
<br />
Now for some convenience, and again here is where Gnome 3 gets more in my way than helping me. Create the file /home/oracle/.local/share/applications/sqldeveloper.desktop with an editor and insert the following<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #f8f8f8; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #ce5c00; font-weight: bold;">[</span>Desktop Entry<span style="color: #ce5c00; font-weight: bold;">]</span>
<span style="color: black;">Type</span><span style="color: #ce5c00; font-weight: bold;">=</span>Application
<span style="color: black;">Name</span><span style="color: #ce5c00; font-weight: bold;">=</span>SQLDeveloper
<span style="color: black;">Comment</span><span style="color: #ce5c00; font-weight: bold;">=</span>Oracle SQLDeveloper
<span style="color: black;">Icon</span><span style="color: #ce5c00; font-weight: bold;">=</span>/home/oracle/bin/sqldeveloper/sqldeveloper/doc/icon.png
<span style="color: black;">Exec</span><span style="color: #ce5c00; font-weight: bold;">=</span>/home/oracle/bin/sqldeveloper/sqldeveloper.sh
<span style="color: black;">Terminal</span><span style="color: #ce5c00; font-weight: bold;">=</span><span style="color: #204a87;">false</span>
<span style="color: black;">Categories</span><span style="color: #ce5c00; font-weight: bold;">=</span>Development;Programming
</pre>
</div>
<br />
Then completely restart the VM as it seems that Gnome only loads this files on startup.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMFEshAvf60Sn-8lxbzmdkKbWS3yeWA0XB87xKG1f-eJMgOoZ6zK51i_ez4UGUNPkM7B4P6MXZcDHPbL4Mumw5eDRCUgLxDI0KtJLLt-XcmIbHnHazAdlbxBDEqZEI-bDVuxAtS4Nniw/s1600/2020-08-25+14_38_40-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="276" data-original-width="429" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMFEshAvf60Sn-8lxbzmdkKbWS3yeWA0XB87xKG1f-eJMgOoZ6zK51i_ez4UGUNPkM7B4P6MXZcDHPbL4Mumw5eDRCUgLxDI0KtJLLt-XcmIbHnHazAdlbxBDEqZEI-bDVuxAtS4Nniw/s320/2020-08-25+14_38_40-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div>
Now Gnome finds SQLDeveloper in it's Activities ...<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCeynD8NT2mXhZzLPV_wsGz2eldGJYvu1Z7mSSg2a_hHv2qLivrQGQlp8F1wmWziSNFa2OWLSRVpzWT-vSxvwPHTHfIABCs3l3fUOpuk6zYIt4yPq7HDgUnir6N1KAPNo9lKO3M7u7kQ/s1600/2020-08-25+14_40_41-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="336" data-original-width="404" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCeynD8NT2mXhZzLPV_wsGz2eldGJYvu1Z7mSSg2a_hHv2qLivrQGQlp8F1wmWziSNFa2OWLSRVpzWT-vSxvwPHTHfIABCs3l3fUOpuk6zYIt4yPq7HDgUnir6N1KAPNo9lKO3M7u7kQ/s320/2020-08-25+14_40_41-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="320" /></a></div>
... and also in the Applications Menu under Programming.<br />
<br />
And again, you can use the same archive to also run SQLDeveloper on your host OS.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic1KjW391S1vCDR_7OUt4HRXR4gO2r04kRj3kTd6KT14hWG_0hxrctJAI1vToEQlzKL4o-B7PemqKb71uO99sO6Ht4QzsyUBpZkpfS66vptlJBi_o88BfL8Nzd2AO0yhDfgWUwn9wR9g/s1600/2020-08-26+11_54_19-Greenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="287" data-original-width="390" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic1KjW391S1vCDR_7OUt4HRXR4gO2r04kRj3kTd6KT14hWG_0hxrctJAI1vToEQlzKL4o-B7PemqKb71uO99sO6Ht4QzsyUBpZkpfS66vptlJBi_o88BfL8Nzd2AO0yhDfgWUwn9wR9g/s320/2020-08-26+11_54_19-Greenshot.png" width="320" /></a></div>
Just unzip the archive to any directory. In my case on Windows I copy the sqldeveloper folder from the zip to D:\Oracle and pin the sqldeveloper.exe to the Taskbar.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGLHe-TuN42fHnL3F8zmWSy6wzcYTcuG-Cm-WEH3Ij6uzTeXE9ulWi-xj6Aq0mQso-I_IGoLnweLp8Qe_m2H5iuS5RHFzlVtFltbIGKeQEYwXADYTRcZtBXCC5zdwJgXt59Ir6zW82Vg/s1600/2020-08-26+12_17_48-Settings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="443" data-original-width="972" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGLHe-TuN42fHnL3F8zmWSy6wzcYTcuG-Cm-WEH3Ij6uzTeXE9ulWi-xj6Aq0mQso-I_IGoLnweLp8Qe_m2H5iuS5RHFzlVtFltbIGKeQEYwXADYTRcZtBXCC5zdwJgXt59Ir6zW82Vg/s640/2020-08-26+12_17_48-Settings.png" width="640" /></a></div>
SQLDeveloper found my previous connectsions and also offers me to import the new ones from tnsnames.ora, as in my VM.<br />
<br />
So with SQLcl and SQLDeveloper we have the basic tools every DB developer needs ready to use in both our VM and the host OS.</div>
Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.comtag:blogger.com,1999:blog-3458889489905771269.post-81723101438480416782020-08-20T06:28:00.006-07:002022-12-20T04:25:38.799-08:00The Oracle DB Developer VM: Upgrade SQLcl to latest version<div dir="ltr" style="text-align: left;" trbidi="on">
This post is part of my Oracle DB Developers VM series. Based on the previous postings on how to set up the Oracle DB on Linux 8 in VirtualBox, this post will show how to upgrade the VM to use the latest SQLcl.<br />
<br />
First we need to install java:<br />
<br />
<div style="background: rgb(248, 248, 248); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;">dnf in java-11-openjdk.x86_64
java -version
</pre>
</div>
<br />
That should give you the info on OpenJDK:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHliFXxfBxLzXD2glh7uYvzos_nFpFVK6Gjxr9smPKzVl2-MXO-Z-merdtNrGf8Vbcqa4l6gQwHJngh9vnM-KVhz2E_JSMNB6WxSfjnLgzd68cpmRBMEoXWs7eOfeS5PTGzfkHj6oRgg/s1600/2020-08-19+17_51_54-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="97" data-original-width="684" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHliFXxfBxLzXD2glh7uYvzos_nFpFVK6Gjxr9smPKzVl2-MXO-Z-merdtNrGf8Vbcqa4l6gQwHJngh9vnM-KVhz2E_JSMNB6WxSfjnLgzd68cpmRBMEoXWs7eOfeS5PTGzfkHj6oRgg/s400/2020-08-19+17_51_54-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
Download the lastest SQLcl from <a href="https://www.oracle.com/uk/tools/downloads/sqlcl-downloads.html">https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip</a> and unzip it to a directory for all your executables under your home directory. In my case:<br />
<!--HTML generated using hilite.me--><br />
<div style="background: rgb(248, 248, 248); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;"><span style="color: #204a87;">cd</span> ~/bin</pre><pre style="line-height: 125%; margin: 0px;">wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip
unzip sqlcl-latest.zip
</pre>
</div>
<br />
Test it with<br />
<!--HTML generated using hilite.me--><br />
<div style="background: rgb(248, 248, 248); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;">sqlcl/bin/sql
</pre>
</div>
<br />
and type version. That should return<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2wrlrREoCAXODacGURmQLPUCPiJH7o7AJi3Ttor5mEw_sGYVQOH9uBywOUX54_7WTn058dX26VAGEsUzZu5y5T5_LeutTK7Y5kqUx8rp3fNmDIRnmqrNfrposzBvJXJ9IKLPeI00kgw/s1600/2020-08-19+18_02_12-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="60" data-original-width="747" height="31" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2wrlrREoCAXODacGURmQLPUCPiJH7o7AJi3Ttor5mEw_sGYVQOH9uBywOUX54_7WTn058dX26VAGEsUzZu5y5T5_LeutTK7Y5kqUx8rp3fNmDIRnmqrNfrposzBvJXJ9IKLPeI00kgw/w400-h31/2020-08-19+18_02_12-OL8+DBDev+%2528vor+DB%2529+%255BRunning%255D+-+Oracle+VM+VirtualBox.png" width="400" /></a></div>
Add the following line to your .bashrc:<br />
<!--HTML generated using hilite.me--><br />
<div style="background: rgb(248, 248, 248); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;"><span style="color: #204a87;">export </span><span style="color: black;">PATH</span><span style="color: #ce5c00; font-weight: bold;">=</span>/home/oracle/bin/sqlcl/bin
</pre><pre style="line-height: 125%; margin: 0px;"><span style="color: #204a87;">export </span>SQLPATH=~/sql</pre></div><p>Create a directory ~/sql and inside a file named login.sql with the above content.</p><!--HTML generated using hilite.me--><div style="background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><pre style="line-height: 16.25px; margin-bottom: 0px; margin-top: 0px;">set statusbar on
set highlighting on
</pre></div><p>This will enable some of the cool features of SQLcl. It is so easy, this is probably my shortest posting ever. </p><p>But wait, there is more. As you already have downloaded the latest platform independent SQLcl, you can also use it to connect from your host OS to the database in your VM.</p></div><div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3b_Vki6qO975vn8zCNkkIDU28PjCbUSMLaNvkild33LbxRIydVDGDBWBtJLcsujVJx1jf777clryOIA3z0T2XQbk-N3QadtqyRHf4JIGHv_SpU6loCn74ZglY-UvxS26m6_WMuwqcTw/s1600/2020-08-20+10_31_25-Greenshot.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="565" data-original-width="846" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3b_Vki6qO975vn8zCNkkIDU28PjCbUSMLaNvkild33LbxRIydVDGDBWBtJLcsujVJx1jf777clryOIA3z0T2XQbk-N3QadtqyRHf4JIGHv_SpU6loCn74ZglY-UvxS26m6_WMuwqcTw/s400/2020-08-20+10_31_25-Greenshot.png" width="400" /></a></div>
So in my case, use Windows Explorer to extract sqlcl to a folder on your drive, eg. <span style="font-family: "courier new" , "courier" , monospace;">D:\Oracle</span> . Put the bin directory into your path. Of course, this SQLcl installation also needs a compatible Java runtime. So if you don't have one, install it first. On Windows better use the installer based version (jdk-11.0.8_windows-x64_bin.exe). I had issues with the JDK zip distributions, probably I have installed and uninstalled so many JDK's, that my Windows Registry is messed up. But the installer based version ran flawless.<br />
<!--HTML generated using hilite.me--><br />
<div style="background: rgb(248, 248, 248); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;">sql.exe system@orcldevvm-ol8:1521/orclpdb
</pre>
</div>
<br />
Try it with an easy connect string.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTnQRT4CBjHQXm81bKjetRuANmvH8YLIbLnNOlaiAUmmX_d1-vVp6U8VUd0M2F0e4qjDRrvHHZb7IMHgorotV4V6ck2fjE9HYEeng1NRkJqwYUf7ExJLBuF3JHN69BcTTx0Z8xyu5nFw/s1600/2020-08-20+13_12_41-Command+Prompt+-+sql.exe++system%2540orcldevvm-ol8_1521_orclpdb.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="326" data-original-width="792" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTnQRT4CBjHQXm81bKjetRuANmvH8YLIbLnNOlaiAUmmX_d1-vVp6U8VUd0M2F0e4qjDRrvHHZb7IMHgorotV4V6ck2fjE9HYEeng1NRkJqwYUf7ExJLBuF3JHN69BcTTx0Z8xyu5nFw/s400/2020-08-20+13_12_41-Command+Prompt+-+sql.exe++system%2540orcldevvm-ol8_1521_orclpdb.png" width="400" /></a></div>
You can also connect via TNS. Create a directory like D:\Oracle\network\admin and an environment variable to point to it like<br />
<!--HTML generated using hilite.me--><br />
<div style="background: rgb(248, 248, 248); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;"><span style="color: #204a87;">set </span><span style="color: black;">TNS_ADMIN</span><span style="color: #ce5c00; font-weight: bold;">=</span>D:<span style="color: #4e9a06;">\O</span>racle<span style="color: #4e9a06;">\n</span>etwork<span style="color: #4e9a06;">\a</span>dmin
</pre>
</div>
<br />
And better make that permanent. Create a tnsnames.ora file in that directory, here is an example to adapt:<br />
<br />
<div style="background: rgb(248, 248, 248); border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0px;"><span style="color: black;">ORCL</span> <span style="color: #ce5c00; font-weight: bold;">=</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">DESCRIPTION</span> <span style="color: #ce5c00; font-weight: bold;">=</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">ADDRESS</span> <span style="color: #ce5c00; font-weight: bold;">=</span> <span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">PROTOCOL</span> <span style="color: #ce5c00; font-weight: bold;">=</span> TCP<span style="color: #ce5c00; font-weight: bold;">)(</span><span style="color: black;">HOST</span> <span style="color: #ce5c00; font-weight: bold;">=</span> orcldevvm-ol8<span style="color: #ce5c00; font-weight: bold;">)(</span><span style="color: black;">PORT</span> <span style="color: #ce5c00; font-weight: bold;">=</span> 1521<span style="color: #ce5c00; font-weight: bold;">))</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">CONNECT_DATA</span> <span style="color: #ce5c00; font-weight: bold;">=</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">SERVER</span> <span style="color: #ce5c00; font-weight: bold;">=</span> DEDICATED<span style="color: #ce5c00; font-weight: bold;">)</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">SERVICE_NAME</span> <span style="color: #ce5c00; font-weight: bold;">=</span> orcl<span style="color: #ce5c00; font-weight: bold;">)</span>
<span style="color: #ce5c00; font-weight: bold;">)</span>
<span style="color: #ce5c00; font-weight: bold;">)</span>
<span style="color: black;">ORCLPDB</span> <span style="color: #ce5c00; font-weight: bold;">=</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">DESCRIPTION</span> <span style="color: #ce5c00; font-weight: bold;">=</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">ADDRESS</span> <span style="color: #ce5c00; font-weight: bold;">=</span> <span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">PROTOCOL</span> <span style="color: #ce5c00; font-weight: bold;">=</span> TCP<span style="color: #ce5c00; font-weight: bold;">)(</span><span style="color: black;">HOST</span> <span style="color: #ce5c00; font-weight: bold;">=</span> orcldevvm-ol8<span style="color: #ce5c00; font-weight: bold;">)(</span><span style="color: black;">PORT</span> <span style="color: #ce5c00; font-weight: bold;">=</span> 1521<span style="color: #ce5c00; font-weight: bold;">))</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">CONNECT_DATA</span> <span style="color: #ce5c00; font-weight: bold;">=</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">SERVER</span> <span style="color: #ce5c00; font-weight: bold;">=</span> DEDICATED<span style="color: #ce5c00; font-weight: bold;">)</span>
<span style="color: #ce5c00; font-weight: bold;">(</span><span style="color: black;">SERVICE_NAME</span> <span style="color: #ce5c00; font-weight: bold;">=</span> orclpdb<span style="color: #ce5c00; font-weight: bold;">)</span>
<span style="color: #ce5c00; font-weight: bold;">)</span>
<span style="color: #ce5c00; font-weight: bold;">)</span>
</pre>
</div>
<br />
Now try it with TNS connect<br />
<br />
<div style="background: rgb(248, 248, 248); border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 16.25px;">sql.exe system@orclpdb
</pre>
</div>
<br />
and that should work too.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUOvgRslQvz4B4YJDvK9mXL1duC1vAN0iPRpKRjI5NXU5iD47iUHcEjw-QkSpYclHKxIKlAE6o73xEpqGJZUQ1raUZL_N8eQB9kACghw9m2UBnSHsaUD-atBFALhY18Da7cj4h8IaDmg/s1600/2020-08-20+15_23_11-Command+Prompt+-+sql.exe++system%2540orclpdb.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="324" data-original-width="803" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUOvgRslQvz4B4YJDvK9mXL1duC1vAN0iPRpKRjI5NXU5iD47iUHcEjw-QkSpYclHKxIKlAE6o73xEpqGJZUQ1raUZL_N8eQB9kACghw9m2UBnSHsaUD-atBFALhY18Da7cj4h8IaDmg/s400/2020-08-20+15_23_11-Command+Prompt+-+sql.exe++system%2540orclpdb.png" width="400" /></a></div>
SQLcl is a super fast and easy way to talk to your Oracle DB.</div>
Arne Brüninghttp://www.blogger.com/profile/09522383565268388308noreply@blogger.com