<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Curious DBA</title><link>https://curiousdba.netlify.app/post/</link><description>Recent content in Posts on Curious DBA</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 16 May 2026 09:15:10 +0000</lastBuildDate><atom:link href="https://curiousdba.netlify.app/post/index.xml" rel="self" type="application/rss+xml"/><item><title>Patching using Auto Upgrade</title><link>https://curiousdba.netlify.app/post/autoupgradepatching/</link><pubDate>Sat, 16 May 2026 09:15:10 +0000</pubDate><guid>https://curiousdba.netlify.app/post/autoupgradepatching/</guid><description>&lt;p>Oracle are recommending we use out of place patching, and AutoUpgrade for
patching. Until now we have used a custom patch download script and an
ansible patching process. Let&amp;rsquo;s see how AutoUpgrade works for patching.&lt;/p>
&lt;p>Documentation is in the Oracle Database Upgrade guide under
&lt;a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/upgrd/autoupgrade-patching.html">AutoUpgrade Patching&lt;/a>.
As with many Oracle things, it takes some effort to understand how it is
supposed to work.&lt;/p>
&lt;h2 id="downloading-auto-upgrade">Downloading Auto Upgrade&lt;/h2>
&lt;p>We download auto upgrade from Oracle Support document
&lt;a href="https://support.oracle.com/support/?documentId=KB123450">KB123450&lt;/a>,
or from the
&lt;a href="https://www.oracle.com/database/upgrades/">Oracle website&lt;/a>
So we can do:&lt;/p></description></item><item><title>PeopleSoft Change Assistant</title><link>https://curiousdba.netlify.app/post/peoplesoftchangeassistant/</link><pubDate>Tue, 06 Jan 2026 11:59:47 +0000</pubDate><guid>https://curiousdba.netlify.app/post/peoplesoftchangeassistant/</guid><description>&lt;p>I am looking into running Change Assistant automatically, but also with
the option of manually running it if necessary. The problem
with this is permissions. We are supposed to log in as our own users
and not as admins if we can help it.&lt;/p>
&lt;h2 id="inspiration">Inspiration&lt;/h2>
&lt;p>The clever people at
&lt;a href="https://psadmin.io">psadmin.io&lt;/a>
came up with
&lt;a href="https://psadmin.io/2017/03/09/running-change-assistant-without-as-administrator/">a method&lt;/a>
which is pretty good start. There are a couple of refinements to this
I felt needed to be made. These mean that the solution is a bit more
complicated than the above.&lt;/p></description></item><item><title>PeopleSoft in Containers</title><link>https://curiousdba.netlify.app/post/peoplesoftincontainers/</link><pubDate>Fri, 28 Nov 2025 09:13:40 +0000</pubDate><guid>https://curiousdba.netlify.app/post/peoplesoftincontainers/</guid><description>&lt;div class="notice notice--warning">
 &lt;div class="notice__title">
 warning&lt;/div>
 &lt;div class="notice__content">TL;DR: If you need Cobol, there is no supported way to get this working.&lt;/div>
&lt;/div>
&lt;p>Oracle mentioned that PeopleSoft is supported in Containers. So, with
great excitement I decided to try to get it working.&lt;/p>
&lt;p>The general approach is as follows:&lt;/p>
&lt;h2 id="install-the-build-environment">Install the build environment&lt;/h2>
&lt;p>This uses the DPK. We need to ensure Podman is installed, and the
associated build tools. Then we run the DPK install to create the
build environment:&lt;/p></description></item><item><title>Setting up VSCode for Ansible on Windows using Podman</title><link>https://curiousdba.netlify.app/post/vscodeansiblewindowspodman/</link><pubDate>Wed, 21 May 2025 15:10:49 +0000</pubDate><guid>https://curiousdba.netlify.app/post/vscodeansiblewindowspodman/</guid><description>&lt;p>My work laptop runs Windows. I would prefer to run Linux, but some
programs I need only work on Windows. Another program I need, Ansible,
does not support Windows.
I get round this by not running it on Windows, but it would be nice
to be able to develop on my laptop to avoid frustration with network
slow downs etc.&lt;/p>
&lt;p>VSCode supports dev containers. This is great, because development
happens in a container. But the officially supported way of doing this
is with Docker. Docker Desktop for Windows is not free. However, Podman
desktop is, so we can use that.&lt;/p></description></item><item><title>Auto Restart Oracle Databases with Systemd</title><link>https://curiousdba.netlify.app/post/autorestartoracledbwithsystemd/</link><pubDate>Wed, 02 Apr 2025 14:19:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/autorestartoracledbwithsystemd/</guid><description>&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>Our databases didn&amp;rsquo;t stop and start automatically with the OS. The oracle
supplied scripts don&amp;rsquo;t cater for standby databases. Lastly we have one
listener per database. Whether this is necessary or not is open to debate, but
I would like to make our databases stop and start with the operating system.
I&amp;rsquo;d also like the following features:&lt;/p>
&lt;ul>
&lt;li>Stop all the databases whether or not they are in the oratab on shutdown.&lt;/li>
&lt;li>Start all database that were stopped on startup.&lt;/li>
&lt;li>Deal with standby and logical standby databases.&lt;/li>
&lt;li>Deal with our unusual listener setup which has one listener per database instance.&lt;/li>
&lt;/ul>
&lt;p>Oracle provides scripts called &lt;code>dbstart&lt;/code> and &lt;code>dbshut&lt;/code> in &lt;code>$ORACLE_HOME/bin&lt;/code>
which are documented in the administrator guide, but they only start and
stop databases in the oratab.&lt;/p></description></item><item><title>Port and TLS scanning with nmap</title><link>https://curiousdba.netlify.app/post/portandtlsscanning/</link><pubDate>Tue, 14 Jan 2025 10:02:47 +0000</pubDate><guid>https://curiousdba.netlify.app/post/portandtlsscanning/</guid><description>&lt;p>I have had a couple of instances where I have needed to look at which
ports are open. On one occasion a firewall change meant I needed to check
in a hurry whether ports I needed were open. On another instance, another
team raised concerns with some of the TLS ciphers listening on some of the
ports in our system.&lt;/p>
&lt;p>I do not recommend port scanning across the internet. All these scans were
completed within my employers infrastructure as part of my job. If you
would like to try these commands and don&amp;rsquo;t have a similar job to me, I would
suggest using devices on your home network such as a raspberry pi, or
scanning a VM running on your laptop. The nmap security scanning book
has
&lt;a href="https://nmap.org/book/legal-issues.html">a chapter on legal issues&lt;/a>.&lt;/p></description></item><item><title>Getting Shorter Garbage Collection Pauses</title><link>https://curiousdba.netlify.app/post/garbagecollectionwaits/</link><pubDate>Fri, 20 Dec 2024 16:59:47 +0000</pubDate><guid>https://curiousdba.netlify.app/post/garbagecollectionwaits/</guid><description>&lt;p>We noticed that our test PeopleSoft system was very slow on occasion, such
that the load balancer decided it was broken. Sessions were redirected
to the webpage we have for the system being in maintenance.&lt;/p>
&lt;p>Since the webserver is Weblogic, it runs in a Java Virtual Machine (JVM).
The first thing to check is how long the garbage collection pauses
are. Fortunately I had garbage collection logging switched on, so
I could see that they were over 100 seconds on occasion, which is
far too long. This is what my garbage collection log parameters
were set to (Java 11).&lt;/p></description></item><item><title>The Problem with Ansible on RedHat</title><link>https://curiousdba.netlify.app/post/ansibleonredhat/</link><pubDate>Wed, 11 Dec 2024 09:59:47 +0000</pubDate><guid>https://curiousdba.netlify.app/post/ansibleonredhat/</guid><description>&lt;p>Normally newer versions of Operating systems have newer packages. But not RedHat
when it comes to Ansible. On my workstation:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;pre tabindex="0">&lt;code>$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.10 (Ootpa)
$ ansible --version
ansible [core 2.16.3]
 config file = /etc/ansible/ansible.cfg
 ...
 python version = 3.12.6
 jinja version = 3.1.2
 libyaml = True&lt;/code>&lt;/pre>
&lt;/div>
&lt;p>But on the management server:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;pre tabindex="0">&lt;code>$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.4 (Plow)
$ ansible --version
ansible [core 2.14.17]
 config file = /etc/ansible/ansible.cfg
 ...
 python version = 3.9.18
 jinja version = 3.1.2
 libyaml = True&lt;/code>&lt;/pre>
&lt;/div>
&lt;p>Wait, what? The older operating system has a newer version of Ansible, and Python?&lt;/p></description></item><item><title>Refreshing a Test PeopleSoft Campus Environment</title><link>https://curiousdba.netlify.app/post/refreshingpeoplesoftcampus/</link><pubDate>Thu, 28 Nov 2024 09:57:49 +0000</pubDate><guid>https://curiousdba.netlify.app/post/refreshingpeoplesoftcampus/</guid><description>&lt;p>We have a number of PeopleSoft test environments. I have written about my
automated build process before, but I have not yet mentioned what we do
to the database when we refresh.&lt;/p>
&lt;p>My approach here is that I want as much as possible to build the
environment from scratch. This means that we have a consistent build.
There are also database fields that need to be changed. Recently
a colleague and I reviewed the tables that needed changing and came up
with the following.&lt;/p></description></item><item><title>Peoplesoft Log Parsing with Regular Expressions</title><link>https://curiousdba.netlify.app/post/parsingpeoplesoftlogs/</link><pubDate>Wed, 25 Sep 2024 09:00:49 +0000</pubDate><guid>https://curiousdba.netlify.app/post/parsingpeoplesoftlogs/</guid><description>&lt;p>As mentioned in my &lt;a href="../googlelogs/">previous post&lt;/a> on this topic, we need to configure BindPlane
to read our files. I chose to use the file source as there was no prepared
parser for PeopleSoft logs.&lt;/p>
&lt;h2 id="configuration-again">Configuration again&lt;/h2>
&lt;h3 id="application-server-and-process-scheduler">Application server and process Scheduler&lt;/h3>
&lt;p>On the application server there are three types of files. These are:&lt;/p>
&lt;h4 id="application-logs">Application Logs&lt;/h4>
&lt;p>I set this up as a file, and added the following regex to split it into
fields. This is wrapped for readability - in reality it is all on one line.
The spaces are part of the regex, the newlines are not.&lt;/p></description></item><item><title>Sending Logs to Google Observability Logging</title><link>https://curiousdba.netlify.app/post/googlelogs/</link><pubDate>Fri, 02 Aug 2024 15:00:49 +0000</pubDate><guid>https://curiousdba.netlify.app/post/googlelogs/</guid><description>&lt;p>At present all our logs are in random files in random places in the
operating system. I would like to see whether we can improve this. As an
example of the problems caused by the current situation, if a user reports
an issue, they normally don&amp;rsquo;t give a timestamp, so we have to assume the
issue occurs say up to 20 minutes before the call was raised. Then we have
to search the logs on the operating system for their user ID. As mentioned
these logs are in various places. It isn&amp;rsquo;t easy to limit to a time span
using standard operating system tools. Also we have a redundant
architecture, meaning the users session could have been on any one of four
web servers, and four application servers. The error could have happened
on any of these 8 VMs.&lt;/p></description></item><item><title>Notes on Caching</title><link>https://curiousdba.netlify.app/post/peoplesoft_cache_notes/</link><pubDate>Fri, 14 Jun 2024 08:00:49 +0000</pubDate><guid>https://curiousdba.netlify.app/post/peoplesoft_cache_notes/</guid><description>&lt;p>Just a quick one this time. PeopleSoft has three different types of cache
at the application server level, and here are some notes on it.&lt;/p>
&lt;h2 id="unshared-cache">Unshared Cache&lt;/h2>
&lt;h3 id="what-it-is">What it is&lt;/h3>
&lt;p>So called because each application server process creates it&amp;rsquo;s own cache
under &lt;code>%PS_SERVDIR%&lt;/code> which is by default &lt;code>$PS_CFG_HOME/domainname/CACHE/&lt;/code>
Under here are directories for each process, e.g. &lt;code>PSAPPSRV_1&lt;/code> etc.&lt;/p>
&lt;h3 id="how-to-use-it">How to use it&lt;/h3>
&lt;p>This is the default type of cache. It is used if you configure&lt;/p></description></item><item><title>Oracle Backup Restore Failures</title><link>https://curiousdba.netlify.app/post/rman05624restoreerror/</link><pubDate>Fri, 10 May 2024 14:15:00 +0000</pubDate><guid>https://curiousdba.netlify.app/post/rman05624restoreerror/</guid><description>&lt;h2 id="how-i-test-my-backups">How I Test My Backups&lt;/h2>
&lt;p>I like to test my backups. It helps me sleep to know I could get my data back if
the worst happened and it was scrambled by ransomware, or a bug in our code.&lt;/p>
&lt;p>My sleep was rendered less peaceful when the restores suddenly started failing
for no reason that I could understand. We use RMAN to backup and restore
the data, and the script
is fairly simple - it effectively says to restore the database as it was at
noon yesterday. Something like this:&lt;/p></description></item><item><title>Process Scheduler Auto Update</title><link>https://curiousdba.netlify.app/post/process_scheduler_auto_update/</link><pubDate>Fri, 26 Apr 2024 16:16:00 +0000</pubDate><guid>https://curiousdba.netlify.app/post/process_scheduler_auto_update/</guid><description>&lt;p>I have been setting up process monitor auto update, and have managed to
get it to work - I can see the process status updates in the process
monitor screen. Here is what I did.&lt;/p>
&lt;p>Oracle support document id
&lt;a href="https://support.oracle.com/epmos/faces/DocumentDisplay?id=2772617.1">2772617.1&lt;/a>
explains how to set this up manually. I wanted this to work as part of
the automated build, which means supplying the parameters as part of
&lt;code>psft_customisations.yml&lt;/code>&lt;/p>
&lt;h2 id="a-gotcha">A Gotcha!&lt;/h2>
&lt;p>We have multiple application servers running on the same port
(but on different VMs).
This means we need different domain IDs for each process scheduler
because domain ID and port are used as a key. I would have thought
that the hostname should be included to make this a unique identifier,
but Oracle have chosen not to do that. Note that domain ID is
different from domain name. Oracle documentation suggests using
the database name in lower case. The DPK default is &lt;code>APPDOM&lt;/code> (which
is also the default domain name). If either of these is used,
when you set up the inter domain event credentials on the process
scheduler and configure the domain (for example by running):&lt;/p></description></item><item><title>Installing Change Assistant</title><link>https://curiousdba.netlify.app/post/changeassistantbasicconfiguration/</link><pubDate>Fri, 22 Mar 2024 16:57:49 +0000</pubDate><guid>https://curiousdba.netlify.app/post/changeassistantbasicconfiguration/</guid><description>&lt;p>I am not sure what best practice would be as to a location to install and
run change assistant. To get the GUI it has to be on Windows. Since we
use a VPN we can&amp;rsquo;t really connect from a laptop as if the VPN drops out
we will interrupt the process which can run for several hours. So at
present we use a Windows server which has a full PeopleSoft installation
to run change assistant.&lt;/p></description></item><item><title>Django on RedHat 9</title><link>https://curiousdba.netlify.app/post/djangoonrhel9/</link><pubDate>Tue, 12 Mar 2024 17:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/djangoonrhel9/</guid><description>&lt;h1 id="django-on-rhel9">Django on RHEL9&lt;/h1>
&lt;p>The reason I am revisiting my Django website is because I am updating
the operating system to RHEL9. At the same time I decided to take the
opportunity to correct a couple of things I was unhappy with in the
previous setup.&lt;/p>
&lt;p>I prefer to take a clean VM and build from that. That way we know
the exact configuration and can document it.&lt;/p>
&lt;h2 id="set-up-linux">Set up Linux&lt;/h2>
&lt;p>We need to install the following (Using YUM)&lt;/p></description></item><item><title>More Django and SAML</title><link>https://curiousdba.netlify.app/post/moredjangosaml/</link><pubDate>Mon, 03 Jul 2023 15:19:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/moredjangosaml/</guid><description>&lt;p>Some time ago I set up a website using
&lt;a href="https://www.djangoproject.com/">Django&lt;/a>
which I protected using SAML and
&lt;a href="https://python-social-auth.readthedocs.io/en/latest/index.html">Python Social Auth&lt;/a>.
I drafted this post, as a follow up to my
&lt;a href="../djangosaml/">original one&lt;/a>
but never published it until now.&lt;/p>
&lt;p>The way to integrate SAML into Django, indeed to integrate most Single Sign On/Identity provider solutions into
most python based websites (Sorry, Service Providers) is to use
&lt;a href="https://python-social-auth.readthedocs.io/">Python Social Auth&lt;/a>.&lt;/p>
&lt;h2 id="installation">Installation&lt;/h2>
&lt;p>We need to ensure the following are installed in the environment&lt;/p></description></item><item><title>Controlling Memory and Swap Usage in Linux with Systemd</title><link>https://curiousdba.netlify.app/post/memoryswapcgroupandsystemd/</link><pubDate>Wed, 07 Jun 2023 09:15:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/memoryswapcgroupandsystemd/</guid><description>&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>We have an application that uses a lot of memory when a user takes particular
actions. I feel the application should take steps to protect itself -
it shouldn&amp;rsquo;t allow an action from a user which will cause issues.
I wasn&amp;rsquo;t able to influence the application so we lived with occasional
out of memory issues, and times where processes could not be forked
due to lack of memory.&lt;/p></description></item><item><title>PeopleSoft Critical patches on Windows</title><link>https://curiousdba.netlify.app/post/patchingpeoplesoftwindows/</link><pubDate>Thu, 30 Jun 2022 11:12:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/patchingpeoplesoftwindows/</guid><description>&lt;p>Back to my series about applying patches to PeopleTools 8.59. I am now visiting
the Windows process scheduler. Like the Unix servers, Oracle installs all the
software, so it all needs to be patched. But there are always additional
complications with Windows.&lt;/p>
&lt;h2 id="java-issues">Java Issues&lt;/h2>
&lt;h3 id="java-patch-download">Java Patch Download&lt;/h3>
&lt;p>If the same procedure as Unix is followed to download Java, we end up with an
executable installer. The only silent install option is &lt;code>/s&lt;/code> - there is no
way to specify the folder it ends up in. Also this does a Windows install
updating the registry etc. It&amp;rsquo;s likely not to want to have two copies of the
same Java in different locations.&lt;/p></description></item><item><title>Encrypting PeopleSoft Internal Communication - Elastic Search and Kibana</title><link>https://curiousdba.netlify.app/post/encryptingelasticsearchcommunication/</link><pubDate>Fri, 24 Jun 2022 08:24:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/encryptingelasticsearchcommunication/</guid><description>&lt;p>Now we have the core PeopleSoft stack communicating encrypting traffic, we
need to address the add-ons. Elastic search is becoming more important, and
it is difficult to use PeopleSoft without it. Here is how to add
encryption to Elastic Search and Kibana.&lt;/p>
&lt;p>There is two way communication between Elastic search and PeopleSoft, Both of
these directions need to be configured. Fortunately we have already done some
of this work.&lt;/p>
&lt;p>This procedure is documented in PeopleBooks under &lt;em>Products -&amp;gt; Development Tools -&amp;gt;
Search Technology -&amp;gt; Working with PeopleSoft Search Framework Security Features&lt;/em>.
Here are links for
&lt;a href="https://docs.oracle.com/cd/F52213_01/pt859pbr3/eng/pt/tpst/ConfiguringSSLBetweenPeopleSoftAndElasticsearch.html">Elasticsearch&lt;/a>
and
&lt;a href="https://docs.oracle.com/cd/F52213_01/pt859pbr3/eng/pt/tpst/ConfiguringSSLForKibana.html">Kibana&lt;/a>&lt;/p></description></item><item><title>Character Sets and Field Sizes</title><link>https://curiousdba.netlify.app/post/charactersetsandfieldsizes/</link><pubDate>Tue, 14 Jun 2022 16:20:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/charactersetsandfieldsizes/</guid><description>&lt;p>Here is an interesting problem we had recently. A field which should be
length 1 was being reported in some cases to be length 4. How is this possible?&lt;/p>
&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>I use &lt;code>dbms_sql.describe_columns&lt;/code> to discover the size of the field in a
remote database. I use this value to recreate a copy of the view in the
remote database as a table locally. This is used for testing.
We can mimic this in the local database as follows:&lt;/p></description></item><item><title>PeopleSoft 8.59 Infra DPK and Critical Patch Updates - Tuxedo and DB</title><link>https://curiousdba.netlify.app/post/patchingpeoplesoftappdbserver/</link><pubDate>Thu, 26 May 2022 09:16:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/patchingpeoplesoftappdbserver/</guid><description>&lt;p>Further to my last article about applying critical patches to the web server,
lets take a look at the application and database servers.&lt;/p>
&lt;h2 id="which-servers">Which Servers?&lt;/h2>
&lt;p>In my mind WebLogic runs on the web tier, and Tuxedo runs on the Application
and process scheduler tier. The Oracle Client is also on the Application and
process scheduler tier. However, since these and Java are installed
on all tiers, we should apply the patches on all tiers.&lt;/p></description></item><item><title>PeopleSoft 8.59 Infra DPK and Critical Patch Updates</title><link>https://curiousdba.netlify.app/post/patchingpeoplesoftwebserver/</link><pubDate>Thu, 19 May 2022 09:11:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/patchingpeoplesoftwebserver/</guid><description>&lt;p>As I write this it is a month after Oracle released the critical patch updates,
but there is still no sign of the &lt;em>Infra DPK&lt;/em>, which contains Java and WebLogic
updates. If Oracle are not going to supply this patch reliably, we will have to
work out how to do it ourselves.&lt;/p>
&lt;h2 id="weblogic-on-the-web-server">WebLogic (On the Web Server)&lt;/h2>
&lt;h3 id="what-weblogic-patches-does-oracle-install">What WebLogic Patches does Oracle Install?&lt;/h3>
&lt;p>In a default install we can do the following as user &lt;code>psadm1&lt;/code>:&lt;/p></description></item><item><title>Encrypting PeopleSoft Internal Communication - Application Server</title><link>https://curiousdba.netlify.app/post/encryptingpeoplesoftapplicationserver/</link><pubDate>Thu, 12 May 2022 10:45:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/encryptingpeoplesoftapplicationserver/</guid><description>&lt;p>In the last article we looked at encrypting communication between
&lt;a href="../encryptingpeoplesoftinternalcommunications/">WebLogic and the load balancer&lt;/a>.
Now it is time to investigate the
traffic between WebLogic and the Application server. Without this
configuration the logs get filled with messages like this:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;pre tabindex="0">&lt;code>WARNING: LLE Configuration discovered!
 Note that LLE has been deprecated.
 You should upgrade to SSL to secure network links.&lt;/code>&lt;/pre>
&lt;/div>
&lt;p>Let&amp;rsquo;s upgrade to SSL then!&lt;/p>
&lt;h2 id="application-server">Application Server&lt;/h2>
&lt;p>We already discussed TLS with regards to the
&lt;a href="../digitalcertificates/">Integration Broker&lt;/a> and the
&lt;a href="../encryptingpeoplesoftinternalcommunications/">Web Server&lt;/a>.
The application server conceptually works in the same way,
but it (mostly) isn&amp;rsquo;t written in Java, so in practice the procedure is
slightly different.&lt;/p></description></item><item><title>Encrypting PeopleSoft Internal Communication - WebLogic Server</title><link>https://curiousdba.netlify.app/post/encryptingpeoplesoftinternalcommunications/</link><pubDate>Thu, 05 May 2022 16:50:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/encryptingpeoplesoftinternalcommunications/</guid><description>&lt;p>In the past we used to assume communication on our network was protected
by physical security. Now
that seems not to be a reasonable assumption. So we should probably encrypt
communication within PeopleSoft. Here is how I do that.&lt;/p>
&lt;p>We control both ends of communication between tiers of PeopleSoft. So
we can create our own certificate authority, and instruct our software
to trust it.&lt;/p>
&lt;h2 id="creating-the-certificate-authority-ca">Creating the Certificate Authority (CA)&lt;/h2>
&lt;p>We need a root certificate for our Certificate Authority (CA).
I created it as follows:&lt;/p></description></item><item><title>TLS and PeopleSoft Integration Gateway</title><link>https://curiousdba.netlify.app/post/digitalcertificates/</link><pubDate>Thu, 28 Apr 2022 16:11:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/digitalcertificates/</guid><description>&lt;p>PeopleSoft in general leaves it to the administrator to ensure that digital
certificates are set up properly. Given digital
certificates don&amp;rsquo;t tend to change very often, and the provider changes even
less frequently, it can be difficult to understand and remember how this works,
and prevent issues.&lt;/p>
&lt;h2 id="what-is-a-digital-certificate">What is a digital certificate?&lt;/h2>
&lt;h3 id="the-two-parts">The two parts&lt;/h3>
&lt;p>There are two parts to a digital certificate. One part is the private key
which is used to encrypt data, and is installed, in our case, on the load
balancer. It is important to keep this safe so nobody can impersonate our
system. The public key is what we are mostly dealing with here. This
is available to anyone and can be used to decrypt the data, and check it
came from someone we trust.&lt;/p></description></item><item><title>Auto Restart Weblogic with Systemd</title><link>https://curiousdba.netlify.app/post/autorestartweblogicwithsystemd/</link><pubDate>Thu, 03 Mar 2022 12:19:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/autorestartweblogicwithsystemd/</guid><description>&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>Our WebLogic server recently crashed. There were a number of issues identified in the post mortem,
which were addressed to prevent the same thing happening again. It also occurred to us that WebLogic should
restart itself automatically if it fell over. This is easily achieved using systemd, but for
whatever reason Oracle chose not to configure it to do this.&lt;/p>
&lt;h2 id="oracles-default-setup">Oracles Default Setup&lt;/h2>
&lt;p>This is a PeopleSoft system which might be configured slightly differently to other
WebLogic installations. PeopleSoft
by default provides a systemd unit file which is mostly copyright warnings, so I won&amp;rsquo;t
include it here. Oracle have created a
legacy &lt;code>init.d&lt;/code> file which is called by systemd as a &lt;code>oneshot&lt;/code>. This in turn calls the &lt;code>startPIA.sh&lt;/code> and &lt;code>stopPIA.sh&lt;/code> scripts
as appropriate. So if the web server crashes, it stays stopped.&lt;/p></description></item><item><title>SAML SSO for Django</title><link>https://curiousdba.netlify.app/post/djangosaml/</link><pubDate>Mon, 15 Nov 2021 08:10:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/djangosaml/</guid><description>&lt;p>The University has a Single Sign On (SSO) system. There are a number of ways that it can be used. In this case I
am investigating the use of Security Assertion Markup Language (SAML). There is also Shibboleth which is related,
and our SSO can also use, but I will leave that till another time.&lt;/p>
&lt;p>I am creating a test application running in django on my desktop. Django by default only listens on the loopback
interface which means it can provide friendly information to developers safe in the knowledge that anyone who can
view it is logged on to my desktop. Sites are identified using their URL, so I need to add a unique hostname.
I edited /etc/hosts and added myhost.local as a hostname to the end of the line that starts 127.0.0.1. Now
I can visit &lt;a href="http://myhost.local:8000">http://myhost.local:8000&lt;/a> in my web browser and get to my test website.&lt;/p></description></item><item><title>Parsing XML with Ansible</title><link>https://curiousdba.netlify.app/post/parsingxmlinansible/</link><pubDate>Wed, 20 Oct 2021 16:19:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/parsingxmlinansible/</guid><description>&lt;p>I am trying to gather some information about an environment once it has been created and save it in a small Django app. This is about my adventures trying to discover the Weblogic version from the it&amp;rsquo;s registry which is an XML file.&lt;/p>
&lt;p>The XML registry is in the Oracle inventory, and starts like this:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1">1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-2">2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-3">3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-4">4&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">&amp;lt;?xml version = &amp;#39;1.0&amp;#39; encoding = &amp;#39;UTF-8&amp;#39; standalone = &amp;#39;yes&amp;#39;?&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;registry&lt;/span> home=&lt;span style="color:#2aa198">&amp;#34;/opt/oracle/psft/pt/bea&amp;#34;&lt;/span> platform=&lt;span style="color:#2aa198">&amp;#34;226&amp;#34;&lt;/span> sessions=&lt;span style="color:#2aa198">&amp;#34;7&amp;#34;&lt;/span> xmlns:ns2=&lt;span style="color:#2aa198">&amp;#34;http://xmlns.oracle.com/cie/gdr/dei&amp;#34;&lt;/span> xmlns:ns3=&lt;span style="color:#2aa198">&amp;#34;http://xmlns.oracle.com/cie/gdr/nfo&amp;#34;&lt;/span> xmlns=&lt;span style="color:#2aa198">&amp;#34;http://xmlns.oracle.com/cie/gdr/rgy&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;distributions&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;distribution&lt;/span> status=&lt;span style="color:#2aa198">&amp;#34;installed&amp;#34;&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;WebLogic Server&amp;#34;&lt;/span> version=&lt;span style="color:#2aa198">&amp;#34;12.2.1.4.0&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>I&amp;rsquo;d like to extract the WebLogic Server version which is on line 4.
As I don&amp;rsquo;t know XML it&amp;rsquo;s tempting to use &lt;code>grep&lt;/code> and &lt;code>sed&lt;/code> to find the information I want, but I notice
there is an XML module in Ansible. It is community maintained, and
it&amp;rsquo;s not stable, so it&amp;rsquo;s behaviour might change. This is valid from versions between 2.4 and 4,
maybe later.&lt;/p></description></item><item><title>Kubernetes, Terraform and Secrets</title><link>https://curiousdba.netlify.app/post/kubernetes_secrets/</link><pubDate>Fri, 23 Jul 2021 17:28:30 +0100</pubDate><guid>https://curiousdba.netlify.app/post/kubernetes_secrets/</guid><description>&lt;h2 id="getting-started-with-kubernetes-and-terraform">Getting started with Kubernetes and Terraform&lt;/h2>
&lt;p>I&amp;rsquo;ve been looking into how to learn terraform. I have also discovered for my project I need to use
Kubernetes.
It turns out that it is really easy to create a kubernetes cluster on the local desktop to have
a play with. Here goes:&lt;/p>
&lt;p>I got started using the &lt;a href="https://learn.hashicorp.com/tutorials/terraform/kubernetes-provider?in=terraform/use-case">following tutorial&lt;/a>
I used Kubernetes in Docker (kind) to test. This turned out to be really easy to install.
I already had Docker installed, so I didn&amp;rsquo;t need to worry about that. I downloaded kind from it&amp;rsquo;s website - there is a compiled executable which is easiest.
&lt;a href="https://kind.sigs.k8s.io/docs/user/quick-start">The instructions say&lt;/a> on Linux:&lt;/p></description></item><item><title>Troubleshooting Etherpad In Google Cloud</title><link>https://curiousdba.netlify.app/post/troubleshootingetherpadingooglecloud/</link><pubDate>Fri, 21 May 2021 10:20:49 +0100</pubDate><guid>https://curiousdba.netlify.app/post/troubleshootingetherpadingooglecloud/</guid><description>&lt;p>There is quite a lot that could go wrong with the work in the
&lt;a href="../connectingthedatabase/">previous post&lt;/a>, and I feel I experienced most of the issues!&lt;/p>
&lt;p>We need to remember there are two projects in play here. One to create the container inside
the infrastructure, and the other to create the infrastructure the conatiner lives in.
A problem could be caused by either of these, and so the correct action needs to be taken
to correct the issue. Most of the issues I encountered were caused by the infrastructure, so
after I corrected each problem I ran:&lt;/p></description></item><item><title>Connecting To The Database</title><link>https://curiousdba.netlify.app/post/connectingthedatabase/</link><pubDate>Fri, 30 Apr 2021 09:19:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/connectingthedatabase/</guid><description>&lt;p>Now that we have a database it is time to connect Etherpad to it.&lt;/p>
&lt;p>We see in the
&lt;a href="https://techdesign.uis.cam.ac.uk/en/latest/guidance/hands-on-google-cloud/#connect-the-database-to-the-web-application">Hands on Guide to Google Cloud&lt;/a>
that the way to achieve this is by setting
some environment variables to be read by Etherpad when it starts. Lets have a look how to do that.&lt;/p>
&lt;h2 id="adding-environment-variables">Adding Environment Variables&lt;/h2>
&lt;p>Once again this is set up by the
&lt;a href="https://gitlab.developers.cam.ac.uk/uis/devops/infra/terraform/gcp-cloud-run-app">cloud run app module&lt;/a>.
which as I noted before is the basis of my webapp.&lt;/p></description></item><item><title>Creating The Database</title><link>https://curiousdba.netlify.app/post/creatingthedatabase/</link><pubDate>Fri, 23 Apr 2021 09:19:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/creatingthedatabase/</guid><description>&lt;p>The next step in the
&lt;a href="https://techdesign.uis.cam.ac.uk/en/latest/guidance/hands-on-google-cloud/#create-a-database-instance">Hands on Guide to Google Cloud&lt;/a>
says we should connect the Etherpad instance to a database. Let&amp;rsquo;s see how we create the database
using the automated processes we are developing.&lt;/p>
&lt;h2 id="creating-the-database-using-terraform">Creating the database using Terraform&lt;/h2>
&lt;h3 id="cloud-sql-module">Cloud SQL module&lt;/h3>
&lt;p>A SQL instance was created by the terraform
code that was generated from the boilerplate. University members can see the
&lt;a href="https://gitlab.developers.cam.ac.uk/uis/devops/gcp-deploy-boilerplate/-/blob/master/%7B%7B%20cookiecutter.product_slug%20%7D%7D-deploy/sql.tf">sql.tf template&lt;/a>. It contains the following:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1"> 1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-2"> 2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-3"> 3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-4"> 4&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-5"> 5&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-6"> 6&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-7">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-7"> 7&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-8">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-8"> 8&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-9">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-9"> 9&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-10">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-10">10&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-11">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-11">11&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-12">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-12">12&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-13">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-13">13&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-14">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-14">14&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-15">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-15">15&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-16">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-16">16&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-17">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-17">17&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-terraform" data-lang="terraform">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">resource&lt;/span> &lt;span style="color:#2aa198">&amp;#34;random_id&amp;#34;&lt;/span> &lt;span style="color:#2aa198">&amp;#34;sql_instance_name&amp;#34;&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> byte_length = &lt;span style="color:#2aa198">4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> prefix = &lt;span style="color:#2aa198">&amp;#34;sql-&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}&lt;span style="color:#586e75">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># We make use of the opinionated Cloud SQL module provided by Google at
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># https://registry.terraform.io/modules/GoogleCloudPlatform/sql-db/.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">#
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># The double-&amp;#34;/&amp;#34; is required. No, I don&amp;#39;t know why.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>&lt;span style="color:#268bd2">module&lt;/span> &lt;span style="color:#2aa198">&amp;#34;sql_instance&amp;#34;&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> source = &lt;span style="color:#2aa198">&amp;#34;GoogleCloudPlatform/sql-db/google//modules/postgresql&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> version = &lt;span style="color:#2aa198">&amp;#34;4.4.0&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name = random_id.sql_instance_name.hex&lt;span style="color:#586e75">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"> # ... Snip ...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>}&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>The University has decided to standardise on Postgres for new database instances. The
comment helpfully links to the documentation for the
&lt;a href="https://registry.terraform.io/modules/GoogleCloudPlatform/sql-db/google/latest/submodules/postgresql">Google SQL module&lt;/a>.&lt;/p></description></item><item><title>Creating Infrastructure With Terraform</title><link>https://curiousdba.netlify.app/post/creatinginfrastructurewithterraform/</link><pubDate>Fri, 16 Apr 2021 11:45:06 +0000</pubDate><guid>https://curiousdba.netlify.app/post/creatinginfrastructurewithterraform/</guid><description>&lt;p>This is an enormous and very complicated area. The
&lt;a href="https://techdesign.uis.cam.ac.uk/en/latest/guidance/hands-on-google-cloud/#deploy-a-custom-etherpad-image">hands on guide&lt;/a>
says to change
the memory limit for the application to make it run faster. So, how do we do this
in terraform?&lt;/p>
&lt;p>In the project generated from cookiecutter, I can simply edit webapp.tf and change
the webapp module to add &lt;code>memory_limit=&amp;quot;1024M&amp;quot;&lt;/code>. Simple, but how do I know I can
do that?&lt;/p>
&lt;p>I need to read up on the &lt;a href="https://www.terraform.io/docs/language/index.html">Terraform language&lt;/a>
to understand what is going on. It seems there are two types of module. A directory
of terraform code is called a
&lt;a href="https://www.terraform.io/docs/language/modules/index.html#the-root-module">Root Module&lt;/a>,
but within that code are module definitions.
These are called &lt;a href="https://www.terraform.io/docs/language/modules/syntax.html">Module blocks&lt;/a>.
So my webapp module defined with the module keyword is a module block.&lt;/p></description></item><item><title>SettingUpTerraform</title><link>https://curiousdba.netlify.app/post/settingupterraform/</link><pubDate>Fri, 05 Mar 2021 10:38:34 +0000</pubDate><guid>https://curiousdba.netlify.app/post/settingupterraform/</guid><description>&lt;p>Before starting to change the configuration with Terraform, there is some
set up work that needs to be done.&lt;/p>
&lt;p>While the getting started guides are fine, in practice this leaves a problem
of how to work with colleagues, and how to manage secrets.&lt;/p>
&lt;p>My colleagues have created a tool called
&lt;a href="https://gitlab.developers.cam.ac.uk/uis/devops/tools/logan">Logan&lt;/a>
which they use to run terraform.
It is installed using pip, but it is a docker container, so will require a working
docker to run properly. I have RedHat 7 installed on my desktop, so I had to
&lt;code>yum install python3&lt;/code>. I found I had to upgrade pip. Since there are other requirements
to install I created a virtual environment to install and run it in:&lt;/p></description></item><item><title>Deploying a Container to Google Cloud</title><link>https://curiousdba.netlify.app/post/deployingacontainertogooglecloud/</link><pubDate>Fri, 26 Feb 2021 10:09:23 +0000</pubDate><guid>https://curiousdba.netlify.app/post/deployingacontainertogooglecloud/</guid><description>&lt;p>Having &lt;a href="../gitlabbuildingcontainerwithautodevops/">created the container&lt;/a>, we now need to deploy it to the Google
cloud. We create a deploy project. This was created for me, I believe
from our &lt;a href="https://gitlab.developers.cam.ac.uk/uis/devops/gcp-deploy-boilerplate">Boilerplate Google Cloud Deployment project&lt;/a>
This project can currently only be viewed from within the University. The
gitlab-ci.yml contained the following at the time of writing:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1"> 1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-2"> 2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-3"> 3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-4"> 4&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-5"> 5&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-6"> 6&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-7">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-7"> 7&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-8">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-8"> 8&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-9">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-9"> 9&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-10">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-10">10&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-11">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-11">11&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-12">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-12">12&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-13">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-13">13&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-14">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-14">14&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-15">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-15">15&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-16">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-16">16&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-17">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-17">17&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-18">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-18">18&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-19">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-19">19&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-20">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-20">20&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-21">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-21">21&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-22">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-22">22&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-23">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-23">23&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-24">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-24">24&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-25">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-25">25&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-26">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-26">26&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-27">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-27">27&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-28">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-28">28&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-29">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-29">29&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-30">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-30">30&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-31">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-31">31&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-32">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-32">32&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-33">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-33">33&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-34">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-34">34&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-35">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-35">35&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-36">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-36">36&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-37">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-37">37&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-38">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-38">38&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-39">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-39">39&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-40">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-40">40&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-41">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-41">41&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-42">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-42">42&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-43">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-43">43&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-44">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-44">44&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-45">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-45">45&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-46">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-46">46&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-47">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-47">47&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Use UIS deployment workflow, adding jobs based on the templates to deploy&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># synchronisation images&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">include&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">project&lt;/span>: &lt;span style="color:#2aa198">&amp;#39;uis/devops/continuous-delivery/ci-templates&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">file&lt;/span>: &lt;span style="color:#2aa198">&amp;#39;/auto-devops/deploy.yml&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">ref&lt;/span>: v1.2.0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># Include template that lints local Terraform files&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">project&lt;/span>: &lt;span style="color:#2aa198">&amp;#39;uis/devops/continuous-delivery/ci-templates&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">file&lt;/span>: &lt;span style="color:#2aa198">&amp;#39;/auto-devops/terraform-lint.yml&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">ref&lt;/span>: v1.2.0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Triggered by manually running the pipeline with DEPLOY_ENABLED=&amp;#34;development&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># and WEBAPP_DOCKER_IMAGE set to the image to deploy&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">deploy_webapp_development&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">extends&lt;/span>: .deploy_webapp_template
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">environment&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">name&lt;/span>: development/$DEPLOY_COMPONENT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">url&lt;/span>: $WEBAPP_URL_DEVELOPMENT
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">variables&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">DEPLOY_ENV&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;DEVELOPMENT&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">rules&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">if&lt;/span>: $WEBAPP_DOCKER_IMAGE == null || $WEBAPP_DOCKER_IMAGE == &amp;#34;&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">when&lt;/span>: never
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">if&lt;/span>: $DEPLOY_ENABLED == &amp;#34;development&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">when&lt;/span>: on_success
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">when&lt;/span>: never
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>	
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">.deploy_webapp_template&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">extends&lt;/span>: .cloud-run-deploy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">variables&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># Informative name for image. This is used to name the image which we push&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># to GCP. It is *not* the name of the image we pull from the GitLab&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># container registry. The fully-qualified container name to *pull* should be&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># set via the WEBAPP_DOCKER_IMAGE variable.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">IMAGE_NAME&lt;/span>: webapp
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># Prefix for service-specific variable names&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">SERVICE_PREFIX&lt;/span>: WEBAPP
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># Variables set by upstream deploy job&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">RUN_SOURCE_IMAGE&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;$WEBAPP_DOCKER_IMAGE&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># The name of the deploy component - will be prefixed with the environment&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># name to create a gitlab deploy environment name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">DEPLOY_COMPONENT&lt;/span>: webapp&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>What it does is to take the deploy template from the devops CI templates in
&lt;a href="https://gitlab.developers.cam.ac.uk/uis/devops/continuous-delivery/ci-templates/-/tree/master/auto-devops">the University GitLab&lt;/a> (This is publicly viewable as I write this) and use them to
deploy using some environment
variables to control what is being deployed. We can see the in the &lt;code>deploy.yml&lt;/code>
the CI is instructed to do a &lt;code>docker pull&lt;/code>
on the container that we built, tag it with the Google container name, then
push it to the Google cloud.
There is another entry for staging, but first let&amp;rsquo;s understand development.&lt;/p></description></item><item><title>Building A Container with AutoDevops in GitLab</title><link>https://curiousdba.netlify.app/post/gitlabbuildingcontainerwithautodevops/</link><pubDate>Fri, 19 Feb 2021 13:46:22 +0000</pubDate><guid>https://curiousdba.netlify.app/post/gitlabbuildingcontainerwithautodevops/</guid><description>&lt;p>In the &lt;a href="../gitlabrunnerforautodevops/">last post&lt;/a> I set up a runner. Now lets see if we can use
it to create a container.&lt;/p>
&lt;p>I am looking into how my
&lt;a href="https://guidebook.devops.uis.cam.ac.uk/en/latest/">colleagues&lt;/a> at
&lt;a href="https://www.cam.ac.uk/">Cambridge&lt;/a> do things. They have a &lt;a href="https://techdesign.uis.cam.ac.uk/en/latest/guidance/hands-on-google-cloud/">handy
guide to the Google cloud&lt;/a>
using what colleagues call &lt;em>click ops&lt;/em>. When I ran through it I was given a project which already had an
ID, so had to make sure I used the project ID I was given rather than the one in the document. This
also applied to the project registry.&lt;/p></description></item><item><title>Gitlab Runner for Auto Devops</title><link>https://curiousdba.netlify.app/post/gitlabrunnerforautodevops/</link><pubDate>Fri, 12 Feb 2021 12:28:00 +0000</pubDate><guid>https://curiousdba.netlify.app/post/gitlabrunnerforautodevops/</guid><description>&lt;p>The Auto DevOps pipeline in GitLab is
supposed to be magic! It just reads your
mind and does whatever you wanted! At least that
seems to be what the sales blurb says!&lt;/p>
&lt;p>Over the next few posts I will investigate how we use it.
It is pretty clever, but we do need to set a couple of things first.&lt;/p>
&lt;h1 id="requirements">Requirements&lt;/h1>
&lt;p>This assumes docker is installed and working on the machine that will
be used for the runner. I used my Linux desktop for this exercise which has Docker already set up.&lt;/p></description></item><item><title>Oracle 19c Critical Patching</title><link>https://curiousdba.netlify.app/post/patching19c/</link><pubDate>Wed, 20 Jan 2021 15:20:49 +0100</pubDate><guid>https://curiousdba.netlify.app/post/patching19c/</guid><description>&lt;p>It is the time of year to apply critical patches. This time round we have some databases
at version 19c. We tend to install a new oracle home
for each patch, as we find this helps us manage the migration. It also reduces
downtime, especially if you have not yet taken advantage of pluggable databases
as we haven&amp;rsquo;t.&lt;/p>
&lt;h2 id="oracle-installer">Oracle Installer&lt;/h2>
&lt;p>I notice from the documentation that there is an &lt;code>applyRU&lt;/code> parameter that can be passed
to the installer to apply the patch. The documentation is quite poor though because
it doesn&amp;rsquo;t specify what should be passed after that. Even more annoying is that if the
patch attempt fails, it will leave the home in an intermediate state and it will have
to be deleted and recreated.&lt;/p></description></item><item><title>Change Assistant on Linux</title><link>https://curiousdba.netlify.app/post/changeassistantonlinux/</link><pubDate>Fri, 23 Oct 2020 17:20:49 +0100</pubDate><guid>https://curiousdba.netlify.app/post/changeassistantonlinux/</guid><description>&lt;h2 id="automating-tools-patches">Automating Tools Patches&lt;/h2>
&lt;p>I have already automated the VM builds, so now I want to automate the application of the patch into
the database. Oracle have done some work here with their Change Assistant tool, which once the database
is set up can be used to apply the patch. Hopefully I can find a way to run change assistant from the
Linux command line and apply the patch using the automated procedure.&lt;/p></description></item><item><title>Cloning a Pluggable Database using Unix commands</title><link>https://curiousdba.netlify.app/post/cloningpluggable/</link><pubDate>Thu, 15 Oct 2020 10:22:49 +0100</pubDate><guid>https://curiousdba.netlify.app/post/cloningpluggable/</guid><description>&lt;p>I read a lot about the flexibility of Oracle commands for pluggable databases.
I haven&amp;rsquo;t seen as much about the old fashioned way to copy data files around and
manually creating a control file. So lets see if that still works. I have a
campus solutions demo instance, lets see if I can copy it and rename it.&lt;/p>
&lt;h2 id="back-up-and-edit-the-control-file">Back Up and Edit the Control File&lt;/h2>
&lt;p>Running a familiar command is promising:&lt;/p></description></item><item><title>Java in the database</title><link>https://curiousdba.netlify.app/post/javainthedb/</link><pubDate>Fri, 02 Oct 2020 14:20:49 +0100</pubDate><guid>https://curiousdba.netlify.app/post/javainthedb/</guid><description>&lt;h2 id="why-start-using-java-in-the-database">Why start using Java in the database?&lt;/h2>
&lt;p>I have had a couple of situations recently where using
Java in the database might come in handy.&lt;/p>
&lt;p>One is replacing a self-hosted database with one on the cloud. The provider
gives access to the database, which means remote procedure calls don&amp;rsquo;t
work - the provider doesn&amp;rsquo;t give access to the underlying OS, they provide
the database as a service. This means the remote procedure call will have
to be replaced in some way.&lt;/p></description></item><item><title>More Lessons About IO</title><link>https://curiousdba.netlify.app/post/morelessonsaboutio/</link><pubDate>Wed, 19 Aug 2020 15:20:49 +0100</pubDate><guid>https://curiousdba.netlify.app/post/morelessonsaboutio/</guid><description>&lt;p>I expect the question after the last I/O article is: How did we make our server go faster?&lt;/p>
&lt;h2 id="things-that-did-work">Things That Did Work&lt;/h2>
&lt;p>Looking at the AWR report, I could see the main problem was that
async I/O was slow. We set&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1">1&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-ini" data-lang="ini">&lt;span style="display:flex;">&lt;span>filesystemio_options&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">&amp;#39;SETALL&amp;#39;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>in the spfile, and this helped a lot. As I understand it,
this enables asynchronous I/O, which means
that rather than waiting for confirmation after writing, the database keeps
on sending data to the SAN. This sped up the I/O by a factor of about 3.&lt;/p></description></item><item><title>Lessons About IO</title><link>https://curiousdba.netlify.app/post/lessonsaboutio/</link><pubDate>Mon, 13 Jul 2020 15:20:49 +0100</pubDate><guid>https://curiousdba.netlify.app/post/lessonsaboutio/</guid><description>&lt;h1 id="how-does-a-database-use-io">How Does a Database Use IO?&lt;/h1>
&lt;p>We have a shiny new database server. We ran some tests on it,
and found it was about the same speed as the old one. Worryingly
the IO system seemed to be struggling to keep up with the load.&lt;/p>
&lt;p>In case you don&amp;rsquo;t know, IO is short for Input/Output, and is
used to describe the use of a hard disc, or similar storage.
We all know that hard discs are slow compared to memory, but
for a database to work well, the IO system needs to be able
to keep up with the work the database is doing. Otherwise the
database will eventually appear to lock up.&lt;/p></description></item><item><title>Split Tunnelling in Windows 10</title><link>https://curiousdba.netlify.app/post/vpnsplittunnellingwindows10/</link><pubDate>Fri, 12 Jun 2020 15:20:49 +0100</pubDate><guid>https://curiousdba.netlify.app/post/vpnsplittunnellingwindows10/</guid><description>&lt;p>We use a Virtual Private Network - a VPN to access all our work servers.
But we use MS teams for meetings,
and our VPN admin asks us not to to push loads of video over the VPN. So what to do?
Disconnecting from the VPN every time a call came in got old pretty fast. And what
do you do if you want to show a colleague something which required VPN access?&lt;/p></description></item><item><title>SNI and Integration Broker</title><link>https://curiousdba.netlify.app/post/sniintegrationgateway/</link><pubDate>Wed, 10 Jun 2020 17:06:10 +0100</pubDate><guid>https://curiousdba.netlify.app/post/sniintegrationgateway/</guid><description>&lt;p>A colleague had created a new service operation in peoplesoft integration
broker, but it wasn&amp;rsquo;t working. After a lot of investigation, and a call to
Oracle, we found the cause was
&lt;a href="https://en.wikipedia.org/wiki/Server_Name_Indication">SNI: Service Name Indication&lt;/a>.
This is a facility which allows several different hostnames to be on the same IP
address, but still listen in HTTPS.&lt;/p>
&lt;p>It seems the Integration Broker converts the hostname to an IP address before
trying to contact the remote site. The problem is then that the remote site
doesn&amp;rsquo;t know which website it wishes to talk to, and this causes a handshake
failure. The messages in the logs are not helpful to say the least.&lt;/p></description></item><item><title>Silent Installation of Tools 8.58</title><link>https://curiousdba.netlify.app/post/silentinstalloftools858/</link><pubDate>Thu, 04 Jun 2020 10:00:00 +0000</pubDate><guid>https://curiousdba.netlify.app/post/silentinstalloftools858/</guid><description>&lt;h2 id="silent-install">Silent install&lt;/h2>
&lt;p>A new feature of 8.58 is the silent installation. The documentation says you can run a command such as:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1">1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-2">2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-3">3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-4">4&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>./psft_dpk_setup.sh &lt;span style="color:#cb4b16">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#cb4b16">&lt;/span> --silent &lt;span style="color:#cb4b16">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#cb4b16">&lt;/span> --response_file&lt;span style="color:#719e07">=&lt;/span>response.txt &lt;span style="color:#cb4b16">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#cb4b16">&lt;/span> --customization_file&lt;span style="color:#719e07">=&lt;/span>psft_customizations.yaml&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>The customizations file is optional, but I decided this time around to use it as much as possible
to create a system as close as possible to what I wanted to end up with. So I copied the file from
&lt;code>&amp;lt;psft_base_dir&amp;gt;/dpk/puppet/production/data/psft_customizations.yaml&lt;/code> and edited it to my satisfaction.
&lt;code>&amp;lt;psft_base_dir&amp;gt;&lt;/code> above is whatever was specified when the installer asked interactively, or in the
response file. This means I had to do a test install before I could do a proper one, but that is fine.&lt;/p></description></item><item><title>Testing IO with SLOB</title><link>https://curiousdba.netlify.app/post/performanceinvestigationwithslob/</link><pubDate>Tue, 19 May 2020 14:49:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/performanceinvestigationwithslob/</guid><description>&lt;p>We recently purchased a new database server. We ran a performance test which our brilliant testing
team have put together and found out the system with the new server was slightly slower than the
system with the old one. The testing team was happy that the test was a pass - the users wouldn&amp;rsquo;t
notice the difference. However, new servers are supposed to be quicker than old ones, so I was
disappointed. I investigated a little further, and found that the AWR report showed there were
more waits on IO on the new hardware than on the old.&lt;/p></description></item><item><title>Redo Inconsistency</title><link>https://curiousdba.netlify.app/post/redosizeinconsistency/</link><pubDate>Tue, 28 Apr 2020 11:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/redosizeinconsistency/</guid><description>&lt;h1 id="redo-investigation">Redo Investigation&lt;/h1>
&lt;p>I was investigating a performance issue on new hardware and installed
&lt;a href="https://kevinclosson.net/2012/02/06/introducing-slob-the-silly-little-oracle-benchmark/">SLOB&lt;/a>
to do so.
I discovered in the AWR report, that the redo generated per transaction was around four times
that in development.&lt;/p>
&lt;p>I checked everything I could think of, including copying the parameter file from development to
the new hardware and using that, but the redo stayed stubbornly high. I
&lt;a href="https://www.freelists.org/post/oracle-l/Redo-per-transaction-inconsistency-when-running-SLOB">asked the oracle-l mailing list for ideas&lt;/a>.
&lt;a href="https://jonathanlewis.wordpress.com/">Jonathan Lewis&lt;/a>
responded &lt;a href="https://www.freelists.org/post/oracle-l/Redo-per-transaction-inconsistency-when-running-SLOB,7">suggesting the high redo could be
caused by the following&lt;/a>:&lt;/p></description></item><item><title>Django on RedHat 7</title><link>https://curiousdba.netlify.app/post/djangoonrhel7/</link><pubDate>Fri, 06 Mar 2020 00:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/djangoonrhel7/</guid><description>&lt;h1 id="django-on-rhel7">Django on RHEL7&lt;/h1>
&lt;p>Here is how I chose to set up Django on RHEL7. This is somewhat painful because the default
Python in RHEL7 is still version 2. Using this to create any new programs seems foolish as it
has already been de-supported by the Python project, so I really have to use Python 3.&lt;/p>
&lt;h2 id="set-up-linux">Set up Linux&lt;/h2>
&lt;p>We need Python 3, Django, Apache, and Postgresql. See the instructions linked in the next section
if the Postgresql packages aren&amp;rsquo;t found. The version that comes with RHEL7 is too old for
the version of Django we want to install.&lt;/p></description></item><item><title>Gnu PG Cache Time To Live</title><link>https://curiousdba.netlify.app/post/gnupgcache/</link><pubDate>Thu, 27 Feb 2020 10:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/gnupgcache/</guid><description>&lt;p>As &lt;a href="https://curiousdba.netlify.app/tags/secrets/">discussed previously&lt;/a>, we use &lt;a href="https://dotat.at/prog/regpg/">regpg&lt;/a>
to manage Ansible secrets. This has been really
useful. One annoyance though is that some tasks can take up to 6 hours to run, but
the gpg agent only caches the gpg passphrase for 10 minutes or so. I end up having to
type the passphrase in several times during a run. I occasionally kick off a run before
I leave for the day. It would be a shame if it was stalled overnight due to waiting for
a passphrase.&lt;/p></description></item><item><title>Ansible trick - Retry an intermittent error</title><link>https://curiousdba.netlify.app/post/ansibleretries/</link><pubDate>Wed, 26 Feb 2020 10:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/ansibleretries/</guid><description>&lt;p>We have recently been having issues with mounting windows shares. It occasionally doesn&amp;rsquo;t work. We don&amp;rsquo;t have access to fix it.
The playbook fails at this step. This is really annoying, because if it tried again it would probably work fine, and
the playbook could complete. It turns out that Ansible does have a way to retry. I got the idea from this &lt;a href="https://stackoverflow.com/questions/44134642/how-to-retry-ansible-task-that-may-fail">Stack Overflow
question&lt;/a>&lt;/p>
&lt;p>The solution is the Ansible &lt;code>retries&lt;/code> keyword. Here is a test of a command that intermittently fails:&lt;/p></description></item><item><title>Auditing Options in the Database</title><link>https://curiousdba.netlify.app/post/auditingoptions/</link><pubDate>Tue, 04 Feb 2020 11:35:00 +0000</pubDate><guid>https://curiousdba.netlify.app/post/auditingoptions/</guid><description>&lt;h1 id="oracle-auditing">Oracle Auditing&lt;/h1>
&lt;p>Oracle have a number of different types of auditing, and in recently created databases
they all coexist. I looked at this recently and thought I had better make some notes
before I forget.&lt;/p>
&lt;p>There are three types of auditing:&lt;/p>
&lt;ul>
&lt;li>Traditional auditing. This is the way things worked before 12.1&lt;/li>
&lt;li>Unified auditing. This is the new rewrite of auditing, but needs some effort to get working.&lt;/li>
&lt;li>Fine grained auditing. This stays the same between traditional and unified auditing.&lt;/li>
&lt;li>Mixed mode auditing. In the Database Security Guide it mentions that newly created databases
can use mixed mode auditing. This allows us to use the functionality of both types of audit.&lt;/li>
&lt;/ul>
&lt;p>Auditing is one tool that can be used to help secure the system. A particular risk is that of an
attacker updating or removing the audit trail. So auditing should be considered as one tool
to keep the system safe. Unfortunately it is one of those things that doesn&amp;rsquo;t look shiny or
help users to do their work, so doesn&amp;rsquo;t tend to get enough resources to make it work
properly.&lt;/p></description></item><item><title>Fixing Logical Standby Go Slow</title><link>https://curiousdba.netlify.app/post/logicalstandbynotes/</link><pubDate>Mon, 06 Jan 2020 14:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/logicalstandbynotes/</guid><description>&lt;h2 id="logical-standby-databases">Logical Standby Databases&lt;/h2>
&lt;p>We use a logical standby database.
The logical standby database is inherently fragile, because it mines the primary
logs, and attempts to rebuild the SQL to apply on the logical.&lt;/p>
&lt;p>This rebuilt SQL is fine most of the time, but if an application release
has altered a table, or updated most of the rows in a large table, this
generated SQL often performs very poorly.&lt;/p>
&lt;h2 id="logical-standby-failure-modes">Logical Standby Failure Modes&lt;/h2>
&lt;p>Typically there are two failure modes for the logical standby database. Either
it will fall over because a SQL statement it has generate doesn&amp;rsquo;t work, or the
generated SQL statement will perform really badly and take forever. The first
is easy to deal with. Find the error message, fix the error, or ignore the SQL
and continue. The second is more difficult, as there is no error message
to investigate. Typically we will notice that the logical standby is getting
a backlog of redo to apply. We need to investigate what is taking a long time.&lt;/p></description></item><item><title>SQL Performance Issues</title><link>https://curiousdba.netlify.app/post/moresqltuning/</link><pubDate>Mon, 23 Dec 2019 11:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/moresqltuning/</guid><description>&lt;p>The initial investigation of this issue is written in the
&lt;a href="../productionemergency/">Production Emergency&lt;/a> post. You might want to read that
first if you haven&amp;rsquo;t already.&lt;/p>
&lt;h2 id="addressing-the-underlying-problem">Addressing the underlying problem&lt;/h2>
&lt;p>We had identified the source of the problem. The SQL text can be extracted from the database as follows:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1">1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-2">2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-3">3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-4">4&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-5">5&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-6">6&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sql" data-lang="sql">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">set&lt;/span> linesize &lt;span style="color:#2aa198">300&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">set&lt;/span> pagesize &lt;span style="color:#2aa198">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">set&lt;/span> long &lt;span style="color:#2aa198">30000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">set&lt;/span> longchunksize &lt;span style="color:#2aa198">300&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">select&lt;/span> sql_text &lt;span style="color:#719e07">from&lt;/span> v$sql &lt;span style="color:#719e07">where&lt;/span> sql_id &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#39;67bqun92ngrsj&amp;#39;&lt;/span>;&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>This displays the SQL text. If the application populates the &lt;code>module&lt;/code>, &lt;code>program&lt;/code> and &lt;code>client_id&lt;/code>
of &lt;code>v$session&lt;/code> using
&lt;code>dbms_application_info&lt;/code>, then there is enough information to find out what code is causing the
problem and even who was running the program that caused it.&lt;/p></description></item><item><title>What to do when production locks up</title><link>https://curiousdba.netlify.app/post/productionemergency/</link><pubDate>Fri, 20 Dec 2019 14:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/productionemergency/</guid><description>&lt;p>Recently our PeopleSoft system locked up. Nobody could do anything, they just got a blank
page in the browser.&lt;/p>
&lt;h2 id="the-system-model">The System Model&lt;/h2>
&lt;p>The approach to use in this situation is to consider how the application works.
In our case a user&amp;rsquo;s web browser will connect to the load balancer, which will connect to a web server.
The web server will pass the query to an available application server out of the pool, which
will then pass the query to the database. Then the results go back up the chain.&lt;/p></description></item><item><title>Triggering an Action in Another Repository</title><link>https://curiousdba.netlify.app/post/gitlabtriggeranotherrepository/</link><pubDate>Tue, 10 Dec 2019 09:34:09 +0000</pubDate><guid>https://curiousdba.netlify.app/post/gitlabtriggeranotherrepository/</guid><description>&lt;h2 id="gitlab-organization">GitLab Organization&lt;/h2>
&lt;p>It seemed reasonable when specifying the repositories, to have three (at first):&lt;/p>
&lt;ul>
&lt;li>One to hold the Ansible roles to build the VMs&lt;/li>
&lt;li>One to hold the custom code that the above repository will deploy&lt;/li>
&lt;li>One to define what the environments look like, things like
&lt;ul>
&lt;li>Memory&lt;/li>
&lt;li>Number of VMs at each tier&lt;/li>
&lt;li>The names of the VMs&lt;/li>
&lt;li>Passwords&lt;/li>
&lt;li>And so on.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="problem">Problem&lt;/h2>
&lt;p>The problem is that when the developer commits code to his repository, they would like it to be deployed
to an environment so they can test it. It makes sense to do this automatically, we have all the information
about the environment in the environment repository. This is different to the repository where the code is
being checked in. It would be nice if we could call across to that and trigger the automated deploy.&lt;/p></description></item><item><title>Copying files using Ansible</title><link>https://curiousdba.netlify.app/post/copyingfilesusingansible/</link><pubDate>Mon, 02 Dec 2019 09:34:09 +0000</pubDate><guid>https://curiousdba.netlify.app/post/copyingfilesusingansible/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Copying large numbers of files around - you would have thought this would be easy using
Ansible. Most of what we do with Ansible is copying files and editing them.
It turns out to be rather difficult to get right.&lt;/p>
&lt;h2 id="copy-module">Copy module&lt;/h2>
&lt;p>The &lt;a href="https://docs.ansible.com/ansible/latest/modules/copy_module.html">copy module&lt;/a>
seems like the correct thing to use at first glance. It copies files from the build host to remote locations.
So I can clone the repository of files to deploy and send them off to where they need to go? Brilliant!
There is a &lt;a href="https://docs.ansible.com/ansible/latest/modules/copy_module.html#notes">note&lt;/a>
at the bottom&lt;/p></description></item><item><title>ORA-13831: SQL profile or patch name specified is invalid</title><link>https://curiousdba.netlify.app/post/fixingora13831/</link><pubDate>Mon, 25 Nov 2019 10:06:09 +0000</pubDate><guid>https://curiousdba.netlify.app/post/fixingora13831/</guid><description>&lt;p>We had a process error with the above error message. I believe this is related to Oracle bug 27496360 which is a
duplicate of 29942554, which is apparently in QA, but is targeted for database 20.1. It being 2019, Oracle
haven&amp;rsquo;t released Oracle 20 yet, so we have no fix. We note it seems to be triggered by applying critical patches.
We have an SR open for this which is attached to the bug.&lt;/p></description></item><item><title>PeopleCode Debugger - Setup and Diagnosis</title><link>https://curiousdba.netlify.app/post/enablingpeoplecodedebugger/</link><pubDate>Fri, 22 Nov 2019 10:06:09 +0000</pubDate><guid>https://curiousdba.netlify.app/post/enablingpeoplecodedebugger/</guid><description>&lt;p>The debugger requires application
designer to be run in three tier mode, i.e. it should connect to the application server
workstation listener rather than to the database itself.&lt;/p>
&lt;p>We found that to achieve this we had to do the following:&lt;/p>
&lt;p>On the application server, run &lt;code>psadmin&lt;/code>, and administer the domain
where the debugger is to be switched on. As of tools 8.57 this is done
by choosing the following options from the menu. Note that the domain will be
shut down once the configure option is chosen.&lt;/p></description></item><item><title>Gitlab Inventories, Private Keys and Secrets</title><link>https://curiousdba.netlify.app/post/gitlabsecretsagain/</link><pubDate>Mon, 18 Nov 2019 10:03:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/gitlabsecretsagain/</guid><description>&lt;h1 id="secrets-and-the-problem-with-build-servers">Secrets and the Problem with Build Servers&lt;/h1>
&lt;p>I am not totally sure I understand this, so let&amp;rsquo;s see if I do when I write it down.&lt;/p>
&lt;p>I decided that gitlab needs to stop accessing hosts using keys from the gitlab runner, because this means:&lt;/p>
&lt;ol>
&lt;li>Everything on gitlab runner can access every VM&lt;/li>
&lt;li>If the gitlab runner moves, nothing can access any VM&lt;/li>
&lt;/ol>
&lt;p>So 1 is too open, and 2 just doesn&amp;rsquo;t work. While I could configure a gitlab runner per environment, it also
strikes me that the secrets are in the ansible build directory and shouldn&amp;rsquo;t be. We need a better
approach.&lt;/p></description></item><item><title>What is automation?</title><link>https://curiousdba.netlify.app/post/whatisautomation/</link><pubDate>Fri, 15 Nov 2019 11:23:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/whatisautomation/</guid><description>&lt;h1 id="what-is-automation">What is automation&lt;/h1>
&lt;p>A colleague asked me if I could give them an overview of automation. It is something
we do sometimes without thinking too much about it.&lt;/p>
&lt;p>Think about &lt;a href="https://en.wikipedia.org/wiki/Lean_enterprise">Lean Enterprise&lt;/a>.
It is all about making things more efficient.&lt;/p>
&lt;h2 id="a-concrete-example">A concrete example&lt;/h2>
&lt;p>Technical staff like me can apply this principle to what we do daily.
Here is a simple example of what might have to be done to deploy an imaginary application.&lt;/p></description></item><item><title>Oracle Sales: Cloud Analytics, Blockchain, IoT, AI - HEUG EMEA 2019</title><link>https://curiousdba.netlify.app/post/heug19oraclesales/</link><pubDate>Thu, 14 Nov 2019 14:33:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/heug19oraclesales/</guid><description>&lt;p>Oracle puts effort into selling at HEUG, which makes sense because we are all users of Oracle software. It is interesting
to know what is out there, but the likelihood is we will never get to use most of it. Also, Oracle pushes cloud which I
find quite depressing because I don&amp;rsquo;t know where I fit in to the new cloud paradigm.&lt;/p>
&lt;p>I made notes from a couple of these sessions, which are quite short, so I will combine them here.&lt;/p></description></item><item><title>Journey to the Cloud - HEUG EMEA 2019</title><link>https://curiousdba.netlify.app/post/heug19journeytothecloud/</link><pubDate>Fri, 08 Nov 2019 09:53:50 +0000</pubDate><guid>https://curiousdba.netlify.app/post/heug19journeytothecloud/</guid><description>&lt;h2 id="is-the-cloud-my-friend">Is the cloud my friend?&lt;/h2>
&lt;p>I am concerned about the cloud. As a DBA I believe the idea is to replace
most of what I do with a cloud provider. So if I want to keep working, should I
work for a cloud provider, or change what I do? In the mean time I am also trying to ensure I can
deliver a better service than the cloud providers using similar technologies in a way that is more
responsive to the needs of my customers. So it is interesting to learn the experiences of
&lt;a href="https://twitter.com/boisestateavpfa?lang=en">Jo Ellen Dinucci&lt;/a>,
Associate VP, Finance and Administration - &lt;a href="https://www.boisestate.edu/">Boise State University&lt;/a> during their journey to the cloud.&lt;/p></description></item><item><title>Celebrating 10 years of failure - HEUG EMEA 2019</title><link>https://curiousdba.netlify.app/post/heug19failure/</link><pubDate>Thu, 07 Nov 2019 09:44:01 +0000</pubDate><guid>https://curiousdba.netlify.app/post/heug19failure/</guid><description>&lt;p>Session &lt;em>Celebrating 10 years of failure, because you won&amp;rsquo;t succeed from the start.&lt;/em>&lt;/p>
&lt;p>Sarah Kobus, University of Amsterdam&lt;/p>
&lt;p>I thought this looked interesting, not least because I have recently realised that
getting everything perfect all the time is not a realistic or desirable goal.
As if to demonstrate the truth of what she was saying, her co-presenter was ill, so Sarah had to present the
session alone!&lt;/p>
&lt;h2 id="how-good-are-we-at-learning-from-failures">How good are we at learning from failures?&lt;/h2>
&lt;p>Everyone encounters failure. As an illustration Sarah spoke about
replacing their Student Information System. The core issue encountered was not investing enough in
changing the business processes to work well with the new system.&lt;/p></description></item><item><title>HEUG 2019</title><link>https://curiousdba.netlify.app/post/heug2019/</link><pubDate>Fri, 01 Nov 2019 09:44:01 +0000</pubDate><guid>https://curiousdba.netlify.app/post/heug2019/</guid><description>&lt;p>I went to &lt;a href="https://www.heug.org/emea">HEUG EMEA&lt;/a> 2019 last week at the &lt;a href="https://www.uva.nl/">University of Amsterdam&lt;/a>.
I enjoyed it.
It was good to meet some other people who work in education and use Oracle technologies.
I haven&amp;rsquo;t been to HEUG before. The HEUG was smaller and I feel more friendly than the &lt;a href="https://curiousdba.netlify.app/tags/ukoug/">UKOUG&lt;/a>.
There were fewer exhibitors, and they seemed less desperate to sell, and happier to just
have a chat about the conference and travel, which actually makes them more approachable,
but I am not sure they sold any more!&lt;/p></description></item><item><title>Missing File</title><link>https://curiousdba.netlify.app/post/missingfile/</link><pubDate>Fri, 18 Oct 2019 11:09:47 +0000</pubDate><guid>https://curiousdba.netlify.app/post/missingfile/</guid><description>&lt;p>This is a post which was sitting in my drafts since the start of last year, but it still seems useful to me.&lt;/p>
&lt;p>It&amp;rsquo;s been a while since I have had a file that was deleted. What course to take depends on context - what do you want to achieve?
In this case I wanted to remove the tablespace. I offlined all the files in the tablespace and deleted it. It is pretty easy really.
The other thing I could have done is recovered the datafiles from the redo logs. Maybe I should try that another time.&lt;/p></description></item><item><title>SQL Tuning</title><link>https://curiousdba.netlify.app/post/sqltuning/</link><pubDate>Fri, 11 Oct 2019 12:00:11 +0100</pubDate><guid>https://curiousdba.netlify.app/post/sqltuning/</guid><description>&lt;h1 id="sql-tuning">SQL Tuning&lt;/h1>
&lt;p>As a DBA I find that people think I know about how to tune SQL. They present me with a query that looks simple, but on inspection has
views on views on complex views, and has an explain plan of over 100 lines! It is difficult to know where to start, particularly when you don&amp;rsquo;t know what the SQL is
supposed to be doing, or understand the structure of the data within the database.&lt;/p></description></item><item><title>Ansible Tricks</title><link>https://curiousdba.netlify.app/post/ansibletricks/</link><pubDate>Fri, 04 Oct 2019 11:11:36 +0100</pubDate><guid>https://curiousdba.netlify.app/post/ansibletricks/</guid><description>&lt;h1 id="some-useful-ansible-tricks">Some Useful Ansible tricks&lt;/h1>
&lt;h2 id="including-a-playbook">Including a playbook&lt;/h2>
&lt;p>I am working on extending my automation to do some new things. We refresh test environments from production.
Previously we used to copy all the code from production back to development. Now we build the VMs from scratch,
so we don&amp;rsquo;t need to do this any more, but it would be convenient to call the VM build in the middle of the
refresh.&lt;/p></description></item><item><title>Hiding Passwords In Ansible</title><link>https://curiousdba.netlify.app/post/hidingpasswordsinansible/</link><pubDate>Fri, 27 Sep 2019 15:00:36 +0100</pubDate><guid>https://curiousdba.netlify.app/post/hidingpasswordsinansible/</guid><description>&lt;p>Often configuring a system involves running scripts and passing
passwords as a parameter. If all goes well, this is fine, Ansible
just reports the task has changed. If not, the password is logged,
which is bad if the output is being sent to people who shouldn&amp;rsquo;t
know it. Here are some thoughts on how to get round that.&lt;/p>
&lt;h2 id="setup">Setup&lt;/h2>
&lt;p>Start with the following playbook for demonstration purposes:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1">1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-2">2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-3">3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-4">4&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-5">5&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-6">6&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-7">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-7">7&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-8">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-8">8&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-9">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-9">9&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">hosts&lt;/span>: &lt;span style="color:#2aa198">127.0.0.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">connection&lt;/span>: local
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">tasks&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">name&lt;/span>: This works
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">command&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;echo This is my secret password&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">name&lt;/span>: This fails
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">shell&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;echo This is my secret password &amp;amp;&amp;amp; false&amp;#34;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>And run it:&lt;/p></description></item><item><title>Moving</title><link>https://curiousdba.netlify.app/post/moving/</link><pubDate>Tue, 17 Sep 2019 16:24:21 +0100</pubDate><guid>https://curiousdba.netlify.app/post/moving/</guid><description>&lt;h1 id="moving">Moving&lt;/h1>
&lt;p>My hosting at the University of Cambridge: people.ds.cam.ac.uk/psh35 is being discontinued. I am therefore moving &lt;a href="https://curiousdba.netlify.app/">this blog&lt;/a> to Netlify:&lt;/p>
&lt;p>Please update your bookmarks or feed reader to: &lt;a href="https://curiousdba.netlify.app/">https://curiousdba.netlify.app/&lt;/a>&lt;/p>
&lt;h1 id="netlify">Netlify&lt;/h1>
&lt;p>This wasn&amp;rsquo;t as hard as it might have been. I took the opportunity to upgrade the theme, because GitHub complained about the security of
some of the components. This caused the site not to build. The new version of the theme requires Hugo pipeline, which means it needs a recent version of
Hugo extended. This won&amp;rsquo;t run (easily) on RHEL7 due to glibcxx being too old. However, Netlify does supply Hugo extended, and allows the user
to pick a version. I needed to upgrade because of a conflict with the theme and the default Hugo version. I picked the latest and my
blog built!&lt;/p></description></item><item><title>Git On Windows</title><link>https://curiousdba.netlify.app/post/gitonwindows/</link><pubDate>Mon, 01 Jul 2019 12:54:48 +0100</pubDate><guid>https://curiousdba.netlify.app/post/gitonwindows/</guid><description>&lt;p>Here is a possible way to use git on Windows to work on a git repository in GitLab. The nice thing about
GitLab is it uses git, so any Windows git client can be used. I prefer command line myself, but there are
GUI options including the git supplied one which I will be using.&lt;/p>
&lt;h2 id="installing-software">Installing software&lt;/h2>
&lt;p>I suggest using chocolatey to manage software. Follow the
&lt;a href="https://chocolatey.org/install">installation instructions on the chocolatey website&lt;/a> to do this.&lt;/p></description></item><item><title>Enroling A New Admin</title><link>https://curiousdba.netlify.app/post/enrolinganewadmin/</link><pubDate>Thu, 13 Jun 2019 10:18:20 +0100</pubDate><guid>https://curiousdba.netlify.app/post/enrolinganewadmin/</guid><description>&lt;h2 id="the-idea">The Idea&lt;/h2>
&lt;p>Sometimes you see a private shared lane which has a gate to stop people using it, but the people who are allowed
have padlocks in a chain. Anyone who has a padlock in the chain can open it with the key in their keyring.&lt;/p>
&lt;p>&lt;img src="../../images/padlocks.jpg" alt="Padlocks on a gate">
&lt;small>&lt;br/>&lt;a href="https://pixabay.com/photos/security-symbol-castle-padlock-670206/">Image from pixabay&lt;/a>&lt;/small>.&lt;/p>
&lt;p>This is very much like how the secure keys work. If someone else wants to be able to use the gate, they have to
get one of the three key holders to go to the gate with them, open their padlock, and insert their padlock into
the chain.&lt;/p></description></item><item><title>Secrets, Ansible and Regpg</title><link>https://curiousdba.netlify.app/post/secretsansibleregpg/</link><pubDate>Fri, 07 Jun 2019 10:13:36 +0100</pubDate><guid>https://curiousdba.netlify.app/post/secretsansibleregpg/</guid><description>&lt;p>I like Ansible, but I find one omission in the way it works is the lack of a way to manage secrets,
i.e. things like private keys, passwords, and access tokens.&lt;/p>
&lt;p>I stored passwords in the inventory file. This
means the inventory file is large, and can&amp;rsquo;t be checked into version
control, which makes it difficult to manage.&lt;/p>
&lt;p>My first test is to create another git repository to check out onto the VM. This contains some application
code which needs to be installed. To check this out to any one of 100 or so VMs I am using
&lt;a href="https://docs.gitlab.com/ee/user/project/deploy_tokens/">gitlabs deploy token&lt;/a>
functionality, which creates a URL like this:&lt;/p></description></item><item><title>Installing Open SSH on Windows (Automatically)</title><link>https://curiousdba.netlify.app/post/windowsopenssh/</link><pubDate>Tue, 04 Jun 2019 10:44:34 +0100</pubDate><guid>https://curiousdba.netlify.app/post/windowsopenssh/</guid><description>&lt;p>Our PeopleSoft system has a couple of maintenance tasks which are kicked off from the database server.
I am converting it to use Ansible and a management server, but in the meantime I need this to work.&lt;/p>
&lt;p>We had been using Bitvise SSH server on Windows, but experienced problems with it locking up
occasionally. Also we needed to create some new Windows VMs and wondered if there was a way
to do the work without paying for more licenses. Also as we are upgrading to Windows server 2016, I am
seeing if there is a way to automate this as part of my Ansible build.&lt;/p></description></item><item><title>Patching Java for PeopleSoft</title><link>https://curiousdba.netlify.app/post/patchingjava/</link><pubDate>Tue, 28 May 2019 13:44:07 +0100</pubDate><guid>https://curiousdba.netlify.app/post/patchingjava/</guid><description>&lt;h2 id="security-updates-not-included">Security Updates Not Included!&lt;/h2>
&lt;p>Oracle&amp;rsquo;s Deployment Package DPK is supposed to deliver all the software required and at the correct versions.
However, it appears this isn&amp;rsquo;t true. PeopleSoft itself is at the current version in the DPK,
but all the software it depends on only has the previous quarters security updates applied. This often
leaves us vulnerable to some quite serious security flaws.&lt;/p>
&lt;p>The solution is to apply the patches after applying the DPK. It is annoying that we have to
do this, because the sales documentation at the time suggested everything would be at the correct
version with the latest patches.&lt;/p></description></item><item><title>Creating Test Data</title><link>https://curiousdba.netlify.app/post/creatingtestdata/</link><pubDate>Mon, 13 May 2019 10:45:54 +0100</pubDate><guid>https://curiousdba.netlify.app/post/creatingtestdata/</guid><description>&lt;p>Here are some notes as to how to create test data from real data with SQL.&lt;/p>
&lt;p>I created a package to do this. It generates SQL statements to mask columns which have personal data, so
we don&amp;rsquo;t end up testing with real peoples data. Here are some things I made it do.&lt;/p>
&lt;p>The procedure loops through a list of tables which is in a local table. In this case we are selecting across a
database link. I use a SQL statement to discover the format of the remote table using dbms_sql.parse.&lt;/p></description></item><item><title>GitLab Runner</title><link>https://curiousdba.netlify.app/post/gitlabrunner/</link><pubDate>Wed, 08 May 2019 11:52:56 +0100</pubDate><guid>https://curiousdba.netlify.app/post/gitlabrunner/</guid><description>&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>Our release process means that we have to refresh test environments on a particular schedule around the date of the
release. These dates were put into a confluence page, but we discovered that the problem with this is that if a release
is moved we have to change all the refresh dates. Also sometimes projects mean particular environments aren&amp;rsquo;t refreshed
or the schedule is altered slightly.&lt;/p>
&lt;p>So it ends up that we have to:&lt;/p></description></item><item><title>Scheduling Tasks in Task Juggler</title><link>https://curiousdba.netlify.app/post/schedulingtasks/</link><pubDate>Fri, 12 Apr 2019 12:10:22 +0100</pubDate><guid>https://curiousdba.netlify.app/post/schedulingtasks/</guid><description>&lt;p>Last time I showed how I set up a project in &lt;a href="http://taskjuggler.org">TaskJuggler&lt;/a>.
Now it is time to add in the tasks.&lt;/p>
&lt;p>Thinking about what I want to achieve, the project goes something like this:&lt;/p>
&lt;h1 id="the-project">The Project&lt;/h1>
&lt;h2 id="update-the-operating-system-on-the-database-server">Update the operating system on the database server&lt;/h2>
&lt;ol>
&lt;li>Update the development database server during the patching window.&lt;/li>
&lt;li>Run a test to make sure it works. This includes&lt;/li>
&lt;/ol>
&lt;ul>
&lt;li>People using it during the day.&lt;/li>
&lt;li>An automated test running overnight.&lt;/li>
&lt;/ul>
&lt;ol>
&lt;li>Assuming it all works, update the test database server during the patching window.&lt;/li>
&lt;li>Run the same tests as above&lt;/li>
&lt;li>Update the UAT database server during the patching window&lt;/li>
&lt;li>Run the tests&lt;/li>
&lt;li>Update production during the patching window.&lt;/li>
&lt;/ol>
&lt;h2 id="patch-the-databases">Patch the databases&lt;/h2>
&lt;p>This looks very similar to above&lt;/p></description></item><item><title>Manging Projects</title><link>https://curiousdba.netlify.app/post/mangingprojetcs/</link><pubDate>Fri, 05 Apr 2019 15:54:02 +0100</pubDate><guid>https://curiousdba.netlify.app/post/mangingprojetcs/</guid><description>&lt;p>One thing I have found terribly dull is project management. This is something we all have to do at times.
My example is the quarterly patching from Oracle. We also take the opportunity to do operating system
updates at the same time.&lt;/p>
&lt;p>Thinking about how to do the work, we have a patch window where systems are allowed to be shut down (Given
the appropriate change control of course) for maintenance to be done. These are twice a week. We have a numer
of systems, dev, test, UAT and production like everyone else, and the patches are moved through
so any issues are discovered before we hit production.&lt;/p></description></item><item><title>Gitlab and Sql Developer</title><link>https://curiousdba.netlify.app/post/gitlabsqldeveloper/</link><pubDate>Tue, 12 Mar 2019 17:06:31 +0000</pubDate><guid>https://curiousdba.netlify.app/post/gitlabsqldeveloper/</guid><description>&lt;p>We recently got access to &lt;a href="https://gitlab.com/explore">Gitlab&lt;/a>. It is
rather more user friendly than our
previous &lt;a href="http://gitolite.com">Gitolite&lt;/a> install, and has lots more features.&lt;/p>
&lt;p>One thing I thought might be useful is to connect SQL developer to it and
use the IDE features.&lt;/p>
&lt;p>The first thing I discovered is that running SQL Developer off a Windows share
is a painful business. Also it is likely to be out of date. Installing it
locally seems like a good move.&lt;/p></description></item><item><title>Automated Testing Users</title><link>https://curiousdba.netlify.app/post/automatedtestusers/</link><pubDate>Mon, 05 Nov 2018 16:42:08 +0000</pubDate><guid>https://curiousdba.netlify.app/post/automatedtestusers/</guid><description>&lt;p>Imagine a situation where a production database is copied to test, and the data scrambled.
Our testers want to access the database because they need to find some data to use for testing.&lt;/p>
&lt;ul>
&lt;li>The testing is automated.&lt;/li>
&lt;li>The refresh is automated&lt;/li>
&lt;li>The scrambling is automated.&lt;/li>
&lt;/ul>
&lt;p>How do we get the testers the password in a secure fashion? Also, how do we ensure testers don&amp;rsquo;t
just use the test user normally? They should log in with their own user name and passwords. Also,
the test user shouldn&amp;rsquo;t have the same password all the time, it should change periodically.
This will ensure that if a tester has found out the password because they need it to develop
the automated tests, they won&amp;rsquo;t know it after they leave, or be tempted to use it when they
ought to be using their own user name.&lt;/p></description></item><item><title>Reducing Downtime With Tmadmin</title><link>https://curiousdba.netlify.app/post/tmadmin/</link><pubDate>Fri, 21 Sep 2018 14:23:00 +0100</pubDate><guid>https://curiousdba.netlify.app/post/tmadmin/</guid><description>&lt;h2 id="reducing-downtime">Reducing Downtime&lt;/h2>
&lt;p>I want to reduce down time. Is it possible to clear a cache, or to restart a server without downtime?
Tmadmin is provided by Oracle to perform low level tasks and includes this type of functionality.&lt;/p>
&lt;p>Lets have a look.&lt;/p>
&lt;h2 id="purging-the-cache">Purging the cache&lt;/h2>
&lt;p>This can&amp;rsquo;t be done if cache sharing is enabled, but if it isn&amp;rsquo;t, it clears the cache for each process one at a time without downtime.&lt;/p></description></item><item><title>Un-Delete Open file</title><link>https://curiousdba.netlify.app/post/undeleteopenfile/</link><pubDate>Fri, 07 Sep 2018 11:56:26 +0100</pubDate><guid>https://curiousdba.netlify.app/post/undeleteopenfile/</guid><description>&lt;p>There is a way to un-delete a file if a program has it open in Linux.&lt;/p>
&lt;h2 id="how-directory-entries-work-in-unix">How directory entries work in Unix&lt;/h2>
&lt;p>When you remove a file on Linux, what actually happens is that the file is unlinked. Lets have a look. I start with a clean directory:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-1">1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-2">2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-3">3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="hl-0-4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#hl-0-4">4&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>$ ls -la
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>total 4
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>drwxrwxr-x 2 me me 6 Sep 4 15:58 .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>drwxrwxr-x 14 me me 4096 Sep 4 15:28 ..
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
&lt;/div>
&lt;p>The directory has two entries, the current directory and the parent directory. The second entry, the number (2 and 14 above), is the number of links to
the file. The current directory has 2 links, one for it&amp;rsquo;s entry in itself &amp;lsquo;.&amp;rsquo; and one for its entry in the parent directory. If we
create a file, it has one link:&lt;/p></description></item><item><title>Delete Online Logs</title><link>https://curiousdba.netlify.app/post/deleteonlinelogs/</link><pubDate>Wed, 05 Sep 2018 14:56:26 +0100</pubDate><guid>https://curiousdba.netlify.app/post/deleteonlinelogs/</guid><description>&lt;p>In the Oracle training courses they always say:&lt;/p>
&lt;blockquote>
&lt;p>Your junior DBA deleted the online redo logs.&lt;/p>&lt;/blockquote>
&lt;p>Of course, it is never your junior DBA that does that. They are standing behind you laughing.&lt;/p>
&lt;p>Anyway, what to do if your junior DBA deletes the online redo logs. Or even if someone else does it, is first of all, not to panic.
According to &lt;a href="https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1817039200346240329">Ask TOM&lt;/a> the worst thing
to do is a shut down abort because if you do that, the database will need to be recovered from the online redo logs, and they
have been removed.&lt;/p></description></item><item><title>More Windows Woes</title><link>https://curiousdba.netlify.app/post/morewindowswoes/</link><pubDate>Fri, 17 Aug 2018 11:50:12 +0100</pubDate><guid>https://curiousdba.netlify.app/post/morewindowswoes/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Having tested my Windows Ansible build all seemed to be going well. A colleague took
the script and ran it, and all seemed to be well, except that Microsoft word
didn&amp;rsquo;t work - It just hung.&lt;/p>
&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>On the Windows process scheduler Microsoft Office can be invoked to run a macro
to populate a template to form a Word Document.&lt;/p>
&lt;p>The problem was that despite the Ansible install having run, and supposedly being
repeatable, it didn&amp;rsquo;t work. The process never ended. Looking at task manager
we can see that Microsoft Word is running, but it never ended.&lt;/p></description></item><item><title>Vagrant Multi VM provisioning</title><link>https://curiousdba.netlify.app/post/vagrant/</link><pubDate>Fri, 10 Aug 2018 15:02:45 +0100</pubDate><guid>https://curiousdba.netlify.app/post/vagrant/</guid><description>&lt;h2 id="multiple-vms-required">Multiple VMs required&lt;/h2>
&lt;p>I am looking into Postgresql, replication and fail over. One way to set this up is to have a primary, a standby
and a witness server. Two run databases, and one - the witness to decide whether a fail over is needed. To test this
it would be nice to create three VMs on my desktop to help test ansible scripts. I have downloaded Virtualbox from Oracle, and my
desktop has loads of memory. It would be nice to be able to script the creation of the VMs and then be able to
run the same ansible playbook that has been developed for the &amp;ldquo;real&amp;rdquo; VMs. Then I can learn postgres and help
develop the playbook and associated scripts.&lt;/p></description></item><item><title>How We Use Ansible</title><link>https://curiousdba.netlify.app/post/howweuseansible/</link><pubDate>Tue, 31 Jul 2018 10:53:39 +0100</pubDate><guid>https://curiousdba.netlify.app/post/howweuseansible/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>I realise I have written a few posts on Ansible, but no overview on how
we manage it. I haven&amp;rsquo;t done any training on Ansible, and this is my
first effort at automation (Apart from some bash and python scripts)
so there is probably much that could be improved.&lt;/p>
&lt;h2 id="our-systems">Our Systems&lt;/h2>
&lt;p>We have about 15 - 25 environments to manage, depending on how you count them.
Around 2-5 of these are vanilla in one form or another, so don&amp;rsquo;t need
to be managed by Ansible. The rest are all production like to some extent,
so need to be managed in a similar manner.&lt;/p></description></item><item><title>Ansible Strings And Numbers</title><link>https://curiousdba.netlify.app/post/ansiblestringsandnumbers/</link><pubDate>Tue, 10 Jul 2018 11:06:14 +0100</pubDate><guid>https://curiousdba.netlify.app/post/ansiblestringsandnumbers/</guid><description>&lt;p>I had a playbook fail because of the error &lt;code>dict object has no element&lt;/code>&lt;/p>
&lt;p>It took me ages to debug it, but the problem is that I had defined the index as a string, but was trying to
match it to a number. To fix it, I only had to quote the version in the inventory, and everything worked.&lt;/p>
&lt;p>I was only caught by this because I was using an old inventory file to test with. I think it used to
automatically cast numbers to string, but that stopped a while ago.&lt;/p></description></item><item><title>Managing Windows with Ansible</title><link>https://curiousdba.netlify.app/post/ansibleonwindows/</link><pubDate>Tue, 26 Jun 2018 18:05:23 +0100</pubDate><guid>https://curiousdba.netlify.app/post/ansibleonwindows/</guid><description>&lt;p>After a lot of trial and error, I finally found a way to make it work. Here is what I did.&lt;/p>
&lt;p>As &lt;a href="../gettingwindowsandansibletoplaynicely/">noted before&lt;/a>, rather than trying to run an installer from a share,
I simply copied it on to the local disc of the VM.&lt;/p>
&lt;p>Before running Ansible on windows, the operating system has to be configured using (for example) the
&lt;a href="https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1">ConfigureRemotingForAnsible.ps1&lt;/a>
script. I took the defaults. I didn&amp;rsquo;t bother setting up any of the advanced options like CredSSP, as in practice there didn&amp;rsquo;t seem to be
any benefit.&lt;/p></description></item><item><title>Getting Windows and Ansible to play nicely</title><link>https://curiousdba.netlify.app/post/gettingwindowsandansibletoplaynicely/</link><pubDate>Tue, 26 Jun 2018 15:09:57 +0100</pubDate><guid>https://curiousdba.netlify.app/post/gettingwindowsandansibletoplaynicely/</guid><description>&lt;p>The challenge is to run an installer from a share, then run some extra configuration.
We do this in Unix (Well, GNU/Linux) all the time, and it is really, really easy.
We even have the software on a Windows share, so we just need to mount that and run it!&lt;/p>
&lt;p>It turns out that Windows is different from Unix. A mounted share doesn&amp;rsquo;t belong to
the system like in Linux, it belongs to a session. A windows session is what is
created when a user logs in to Windows, it contains the desktop, the windows,
and the various attributes of the connected user, their permissions for example.&lt;/p></description></item><item><title>Weird PeopleTools Install Issue On Windows</title><link>https://curiousdba.netlify.app/post/weirdpeopletoolsinstallissueonwindows/</link><pubDate>Wed, 23 May 2018 15:34:25 +0100</pubDate><guid>https://curiousdba.netlify.app/post/weirdpeopletoolsinstallissueonwindows/</guid><description>&lt;p>I am not sure how this situation arises, but I discovered that
sometimes the windows installer (Puppet based) on Windows gets
into a state where it isn&amp;rsquo;t installed, but thinks it is, which
means that the install won&amp;rsquo;t work, but it generates messages as
if it had worked.&lt;/p>
&lt;p>Under c:\psft\pt\ps_home8.55.23 is only the jre directory.
Running the install again appears to work, but doesn&amp;rsquo;t do
anything.&lt;/p>
&lt;p>The solution is to run the uninstall, then the install will work.&lt;/p></description></item><item><title>Powershell Parameters</title><link>https://curiousdba.netlify.app/post/powershellparameters/</link><pubDate>Tue, 03 Apr 2018 16:17:46 +0100</pubDate><guid>https://curiousdba.netlify.app/post/powershellparameters/</guid><description>&lt;p>I got an error from powershell:&lt;/p>
&lt;div class="highlight-container">
 &lt;button class="copy-code-btn outline">Copy&lt;/button>
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#1"> 1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#2"> 2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#3"> 3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#4"> 4&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#5"> 5&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#6"> 6&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="7">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#7"> 7&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="8">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#8"> 8&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="9">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#9"> 9&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="10">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#10">10&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>PS C:\&amp;gt; Start-Process -NoNewWindow -Verb RunAs
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Start-Process : Parameter set cannot be resolved using the specified named
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>parameters.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>At line:1 char:1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+ start-process -NoNewWindow -verb runas
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> + CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterB
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> indingException
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.PowerShell.Comma
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> nds.StartProcessCommand
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
 &lt;/div>

&lt;p>This is because the
&lt;a href="https://stackoverflow.com/questions/31750263/ambiguousparameterset-in-a-function-with-multiple-parametersetname">Start-Process&lt;/a>
command has two parameter sets. Looking at the page linked, the parameters are listed in two groups. These groups
can&amp;rsquo;t be mixed and matched. You have to pick one or the other. So if you want to do runas, you can&amp;rsquo;t
use NoNewWindow.&lt;/p></description></item><item><title>More Recovery Manager Problems</title><link>https://curiousdba.netlify.app/post/morermanproblems/</link><pubDate>Thu, 29 Mar 2018 15:41:13 +0000</pubDate><guid>https://curiousdba.netlify.app/post/morermanproblems/</guid><description>&lt;p>A nice feature of RMAN is that if a restore fails, and you rerun it,
it realises that it doesn&amp;rsquo;t have to redo all the work it has already
done.&lt;/p>
&lt;p>At least, that is usually what happens.&lt;/p>
&lt;p>Today we got:&lt;/p>
&lt;div class="highlight-container">
 &lt;button class="copy-code-btn outline">Copy&lt;/button>
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#1">1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#2">2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#3">3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#4">4&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#5">5&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#6">6&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="7">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#7">7&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="8">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#8">8&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>RMAN-00571: ===========================================================
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RMAN-00571: ===========================================================
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RMAN-03002: failure of Duplicate Db command at 03/29/2018 12:54:29
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RMAN-05501: aborting duplication of target database
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RMAN-03015: error occurred in stored script Memory Script
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>RMAN-06004: ORACLE error from recovery catalog database:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> RMAN-20003: target database incarnation not found in recovery catalog
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
 &lt;/div>

&lt;p>As documented in oracle support note 2036644.1, this is caused by
oracle bug 14683854, and the workaround is to remove&lt;/p></description></item><item><title>Redundancy</title><link>https://curiousdba.netlify.app/post/redundancy/</link><pubDate>Wed, 28 Mar 2018 17:25:35 +0100</pubDate><guid>https://curiousdba.netlify.app/post/redundancy/</guid><description>&lt;p>I have been thinking about our DR process, and how to improve it. More on that
in a later post. However we recently had a couple of planned server room
outages, where my previous planning has been beneficial.&lt;/p>
&lt;p>Production is redundant and resilient across our server rooms. However,
the other environments are not because redundancy is expensive and only
really needed for production systems.&lt;/p>
&lt;p>So what we do is to have half of the non-production systems at one site.
and the other half at the other. This means that we can shut a machine
room down, and half the development environments will continue to run.&lt;/p></description></item><item><title>Rman Fail</title><link>https://curiousdba.netlify.app/post/rmanfail/</link><pubDate>Fri, 09 Feb 2018 15:37:15 +0000</pubDate><guid>https://curiousdba.netlify.app/post/rmanfail/</guid><description>&lt;p>Here is another issue we had with RMAN. This one has been bugging me for years.&lt;/p>
&lt;p>We were doing a duplicate using rman. For some reason the recovery catalogue didn&amp;rsquo;t contain
the archive log we needed to do the recovery, so the restore completed, and finished with
the familiar error:&lt;/p>
&lt;div class="highlight-container">
 &lt;button class="copy-code-btn outline">Copy&lt;/button>
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#1"> 1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#2"> 2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#3"> 3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#4"> 4&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#5"> 5&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#6"> 6&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="7">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#7"> 7&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="8">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#8"> 8&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="9">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#9"> 9&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="10">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#10">10&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="11">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#11">11&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="12">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#12">12&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="13">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#13">13&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-console" data-lang="console">&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>executing command: SET until clause
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Starting recover at 2018-02-02 16:03:13
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>starting media recovery
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>unable to find archived log
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>archived log thread=1 sequence=307
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Oracle Error:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ORA-01152: file 1 was not restored from a sufficiently old backup
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ORA-01110: data file 1: &amp;#39;system.dbf&amp;#39;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
 &lt;/div>

&lt;p>The normal thing to do here is to correct the error, and redo the backup. But we
already had the redo logs on the disc, and wanted to be able to apply them.&lt;/p></description></item><item><title>More Crash Consistent Recovery</title><link>https://curiousdba.netlify.app/post/morecrashconsistentrecovery/</link><pubDate>Tue, 23 Jan 2018 10:45:57 +0000</pubDate><guid>https://curiousdba.netlify.app/post/morecrashconsistentrecovery/</guid><description>&lt;h2 id="different-scenarios">Different Scenarios&lt;/h2>
&lt;p>In my &lt;a href="../crashconsistentrecovery/">previous post&lt;/a> on this topic, I noted that you could use the snapshot time
on the recover database command to recover the database from a SAN snapshot.&lt;/p>
&lt;p>I realise that there are different possible scenarios and my write up wasn&amp;rsquo;t clear
on which approach is applicable when. Also, the test I did was unrealistic as I
used the logs after the snapshot was taken, and the whole point of using
SAN snapshots is that they contain everything required for a crash consistent
recovery.&lt;/p></description></item><item><title>Recovery Manager Problems</title><link>https://curiousdba.netlify.app/post/rmanproblems/</link><pubDate>Fri, 19 Jan 2018 11:41:13 +0000</pubDate><guid>https://curiousdba.netlify.app/post/rmanproblems/</guid><description>&lt;p>Lots of people seem to like Oracles Recovery manager. I am not one of them.
I think this is because of a lack of understanding on my part of how it works. It is
a complex beast, and at the same time has some annoying limitations.&lt;/p>
&lt;p>I like to automate things. I have a number of scripts to call RMAN to
do backups and restores in common situations. These fail far too often
for my liking. I feel I should look into why. Maybe I can learn to love
RMAN? We shall see.&lt;/p></description></item><item><title>High Water Mark</title><link>https://curiousdba.netlify.app/post/highwatermark/</link><pubDate>Tue, 09 Jan 2018 15:23:14 +0000</pubDate><guid>https://curiousdba.netlify.app/post/highwatermark/</guid><description>&lt;p>We are running a data conversion and got a wait event I don&amp;rsquo;t normally see:
&lt;img src="../../HWM/Configuration.png" alt="Oracle enterprise manager showing configuration waits">
The brown is identified as &lt;em>Configuration&lt;/em>. It I drill down, I can see more detail.
&lt;img src="../../HWM/HWContention.png" alt="Oracle enterprise manager showing High Watermark waits">
Here light purple is &lt;em>HW Contention&lt;/em> (i.e. High Watermark Contention). Darker
purple is &lt;em>Write Complete waits&lt;/em>, and yellow is &lt;em>buffer busy waits&lt;/em>.&lt;/p>
&lt;p>We have deferred segment creation switched on for the database. This means that the
segment needs to be created before data can be written. The high watermark can only
be moved by one process at a time.&lt;/p></description></item><item><title>Exporting Statistics</title><link>https://curiousdba.netlify.app/post/exportingstats/</link><pubDate>Wed, 20 Dec 2017 11:28:20 +0000</pubDate><guid>https://curiousdba.netlify.app/post/exportingstats/</guid><description>&lt;p>This was surprisingly more difficult than I expected. We know that we can export stats
from the dictionary to a table, and from the table to a file, and that file can be copied
and imported to another database for the stats to be imported. Easy right?&lt;/p>
&lt;div class="highlight-container">
 &lt;button class="copy-code-btn outline">Copy&lt;/button>
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#1"> 1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#2"> 2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#3"> 3&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="4">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#4"> 4&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="5">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#5"> 5&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="6">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#6"> 6&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="7">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#7"> 7&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="8">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#8"> 8&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="9">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#9"> 9&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="10">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#10">10&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="11">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#11">11&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="12">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#12">12&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="13">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#13">13&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="14">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#14">14&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="15">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#15">15&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="16">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#16">16&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="17">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#17">17&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="18">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#18">18&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="19">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#19">19&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="20">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#20">20&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="21">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#21">21&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="22">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#22">22&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="23">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#23">23&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="24">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#24">24&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="25">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#25">25&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sql" data-lang="sql">&lt;span style="display:flex;">&lt;span>$ sqlplus &lt;span style="color:#719e07">/&lt;/span> &lt;span style="color:#719e07">as&lt;/span> sysdba
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">SQL&lt;/span>&lt;span style="color:#719e07">*&lt;/span>Plus: Release &lt;span style="color:#2aa198">12&lt;/span>.&lt;span style="color:#2aa198">1&lt;/span>.&lt;span style="color:#2aa198">0&lt;/span>.&lt;span style="color:#2aa198">2&lt;/span>.&lt;span style="color:#2aa198">0&lt;/span> Production &lt;span style="color:#719e07">on&lt;/span> Tue &lt;span style="color:#b58900">Dec&lt;/span> &lt;span style="color:#2aa198">19&lt;/span> &lt;span style="color:#2aa198">08&lt;/span>:&lt;span style="color:#2aa198">55&lt;/span>:&lt;span style="color:#2aa198">39&lt;/span> &lt;span style="color:#2aa198">2017&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Copyright (&lt;span style="color:#719e07">c&lt;/span>) &lt;span style="color:#2aa198">1982&lt;/span>, &lt;span style="color:#2aa198">2014&lt;/span>, Oracle. &lt;span style="color:#719e07">All&lt;/span> rights reserved.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connected &lt;span style="color:#719e07">to&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Oracle &lt;span style="color:#719e07">Database&lt;/span> &lt;span style="color:#2aa198">12&lt;/span>&lt;span style="color:#719e07">c&lt;/span> Enterprise Edition Release &lt;span style="color:#2aa198">12&lt;/span>.&lt;span style="color:#2aa198">1&lt;/span>.&lt;span style="color:#2aa198">0&lt;/span>.&lt;span style="color:#2aa198">2&lt;/span>.&lt;span style="color:#2aa198">0&lt;/span> &lt;span style="color:#719e07">-&lt;/span> &lt;span style="color:#2aa198">64&lt;/span>&lt;span style="color:#b58900">bit&lt;/span> Production
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">SQL&lt;/span>&lt;span style="color:#719e07">&amp;gt;&lt;/span> &lt;span style="color:#719e07">exec&lt;/span> DBMS_STATS.CREATE_STAT_TABLE(&lt;span style="color:#2aa198">&amp;#39;SCHEMA&amp;#39;&lt;/span>,&lt;span style="color:#2aa198">&amp;#39;MYSTATS&amp;#39;&lt;/span>,&lt;span style="color:#2aa198">&amp;#39;USERS&amp;#39;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>PL&lt;span style="color:#719e07">/&lt;/span>&lt;span style="color:#719e07">SQL&lt;/span> &lt;span style="color:#719e07">procedure&lt;/span> successfully completed.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">SQL&lt;/span>&lt;span style="color:#719e07">&amp;gt;&lt;/span> &lt;span style="color:#719e07">@&lt;/span>export_stats
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">BEGIN&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>DBMS_STATS.EXPORT_TABLE_STATS ( &lt;span style="color:#2aa198">&amp;#39;SCHEMA&amp;#39;&lt;/span>, &lt;span style="color:#2aa198">&amp;#39;MYTABLE&amp;#39;&lt;/span>, &lt;span style="color:#719e07">NULL&lt;/span>, stattab &lt;span style="color:#719e07">=&amp;gt;&lt;/span> &lt;span style="color:#2aa198">&amp;#39;MYSTATS&amp;#39;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">END&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">*&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ERROR &lt;span style="color:#719e07">at&lt;/span> line &lt;span style="color:#2aa198">1&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ORA&lt;span style="color:#719e07">-&lt;/span>&lt;span style="color:#2aa198">20002&lt;/span>: &lt;span style="color:#719e07">Version&lt;/span> &lt;span style="color:#719e07">of&lt;/span> &lt;span style="color:#719e07">statistics&lt;/span> &lt;span style="color:#719e07">table&lt;/span> &lt;span style="color:#2aa198">&amp;#34;SCHEMA&amp;#34;&lt;/span>.&lt;span style="color:#2aa198">&amp;#34;MYSTATS&amp;#34;&lt;/span> &lt;span style="color:#719e07">is&lt;/span> too &lt;span style="color:#719e07">old&lt;/span>. Please
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>try upgrading it &lt;span style="color:#719e07">with&lt;/span> dbms_stats.upgrade_stat_table
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ORA&lt;span style="color:#719e07">-&lt;/span>&lt;span style="color:#2aa198">06512&lt;/span>: &lt;span style="color:#719e07">at&lt;/span> &lt;span style="color:#2aa198">&amp;#34;SYS.DBMS_STATS&amp;#34;&lt;/span>, line &lt;span style="color:#2aa198">18000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ORA&lt;span style="color:#719e07">-&lt;/span>&lt;span style="color:#2aa198">06512&lt;/span>: &lt;span style="color:#719e07">at&lt;/span> line &lt;span style="color:#2aa198">1&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
 &lt;/div>

&lt;p>Hang on, I just created it! How can it be too old? Still, I will upgrade it if it insists.&lt;/p></description></item><item><title>Parsing</title><link>https://curiousdba.netlify.app/post/parsing/</link><pubDate>Tue, 19 Dec 2017 10:54:05 +0000</pubDate><guid>https://curiousdba.netlify.app/post/parsing/</guid><description>&lt;p>We are running a data conversion. The powers that be decided to use APIs to
convert the data as they contain error checking. The problem is that they
are generally designed for interactive use updating one row at a time, so
they are very slow to update large batches of data.&lt;/p>
&lt;p>This was tuned and is getting much faster, however we noticed that there are
a lot of waits on &lt;em>cursor: pin: S wait on X&lt;/em>. From experience I know that this
is caused by excessive hard parsing. However, I couldn&amp;rsquo;t find any statements
with a lot of hard parses. The most was about 40, so nothing like the
thousands which were a cause of this problem early in the release cycle of 12c,
where cursors weren&amp;rsquo;t being shared properly (Bug 20476175 fixed by the patch
of the same number).&lt;/p></description></item><item><title>Crash Consistent Recovery</title><link>https://curiousdba.netlify.app/post/crashconsistentrecovery/</link><pubDate>Mon, 11 Dec 2017 16:17:41 +0000</pubDate><guid>https://curiousdba.netlify.app/post/crashconsistentrecovery/</guid><description>&lt;h2 id="problem">Problem&lt;/h2>
&lt;p>Since Oracle 12c, you can recover a crash consistent snapshot. Oracle support note 604683.1 says how to do this.&lt;/p>
&lt;p>We had an issue where the recovery wanted to effectively run to the end of time, and wouldn&amp;rsquo;t ever finish.
No matter how many logs were applied, it said:&lt;/p>
&lt;div class="highlight-container">
 &lt;button class="copy-code-btn outline">Copy&lt;/button>
 &lt;div class="highlight">&lt;div style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="1">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#1">1&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="2">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#2">2&lt;/a>
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#495050" id="3">&lt;a style="outline:none;text-decoration:none;color:inherit" href="#3">3&lt;/a>
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sql" data-lang="sql">&lt;span style="display:flex;">&lt;span>ORA&lt;span style="color:#719e07">-&lt;/span>&lt;span style="color:#2aa198">01547&lt;/span>: warning: RECOVER succeeded but &lt;span style="color:#719e07">OPEN&lt;/span> RESETLOGS would &lt;span style="color:#719e07">get&lt;/span> error below
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ORA&lt;span style="color:#719e07">-&lt;/span>&lt;span style="color:#2aa198">01194&lt;/span>: file &lt;span style="color:#2aa198">1&lt;/span> needs &lt;span style="color:#719e07">more&lt;/span> recovery &lt;span style="color:#719e07">to&lt;/span> be consistent
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ORA&lt;span style="color:#719e07">-&lt;/span>&lt;span style="color:#2aa198">01110&lt;/span>: &lt;span style="color:#719e07">data&lt;/span> file &lt;span style="color:#2aa198">1&lt;/span>: &lt;span style="color:#2aa198">&amp;#39;/CS_SR/system/system01.dbf&amp;#39;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>
 &lt;/div>

&lt;h2 id="solution">Solution&lt;/h2>
&lt;p>The solution is the snapshot time of the recovery clause. To demonstrate
I have a database
being recovered from a snapshot, and here are some archived redo logs from the
source database.&lt;/p></description></item><item><title>Tech 17 - Oracle 18c The Next Update</title><link>https://curiousdba.netlify.app/post/tech17newin18c/</link><pubDate>Thu, 07 Dec 2017 17:40:54 +0000</pubDate><guid>https://curiousdba.netlify.app/post/tech17newin18c/</guid><description>&lt;p>Dominic Giles drew our attention to the safe harbour statement. Anything can change
between now and when the new version is released.&lt;/p>
&lt;p>There has been some confusion about the announcements regarding autonomous
database. This is a &lt;em>service&lt;/em> on top of oracle 18c. Oracle 18c is a product.&lt;/p>
&lt;h2 id="release-schedule">Release Schedule&lt;/h2>
&lt;p>Oracle will change its release process to release annually. Hopefully this
will lead to more stable releases, as there won&amp;rsquo;t be a rush to get the new
features into the current version of the database. Changes will be
incremental, but will happen every year. There will be quarterly release
updates. These will go back to using a number rather than a date format,
These will include all fixes, not just security fixes, but performance
changes will be switched off by default.&lt;/p></description></item><item><title>Tech 17 - Oracle Database 12c Release 2 - What is new in the Oracle Optimiser</title><link>https://curiousdba.netlify.app/post/tech17optimizer122newfeatures/</link><pubDate>Thu, 07 Dec 2017 14:55:12 +0000</pubDate><guid>https://curiousdba.netlify.app/post/tech17optimizer122newfeatures/</guid><description>&lt;p>The first session after lunch was Oracle Database 12c Release 2 - What is new
in the Oracle Optimiser. It was taken by &lt;a href="https://blogs.oracle.com/optimizer/oracle-optimizer-2">Nigel Baylis&lt;/a> who is the product
manager for the oracle optimiser.&lt;/p>
&lt;p>I was impressed by Nigel&amp;rsquo;s honesty when he talked about what worked, what
didn&amp;rsquo;t and how things are being changed to correct the mistakes of the past.
This is the main reason to come to user groups of course. It made me feel
like Oracle are willing to accept where things haven&amp;rsquo;t worked out as they
hoped, and take action to correct it.&lt;/p></description></item><item><title>Tech 17 - New Indexing Features</title><link>https://curiousdba.netlify.app/post/tech17newindexfeatures/</link><pubDate>Thu, 07 Dec 2017 14:52:38 +0000</pubDate><guid>https://curiousdba.netlify.app/post/tech17newindexfeatures/</guid><description>&lt;p>For the last session before lunch I listened to &lt;a href="https://richardfoote.wordpress.com/">Richard Foote&lt;/a> talking about
new index features in 12.2. Richard is well known as the Oracle Indexing
expert, and so I was eager to hear what he had to say.&lt;/p>
&lt;h2 id="object-name-length">Object name length&lt;/h2>
&lt;p>Indexes can now have 128 character names,
where before they could only be 30 characters. I expect this will make
life easier where naming standards dictate long names for whatever reason.&lt;/p></description></item><item><title>Tech17 - Auditing the Oracle Database</title><link>https://curiousdba.netlify.app/post/tech17auditing/</link><pubDate>Thu, 07 Dec 2017 14:45:16 +0000</pubDate><guid>https://curiousdba.netlify.app/post/tech17auditing/</guid><description>&lt;p>The presenter was &lt;a href="http://www.petefinnigan.com/">Pete Finnigan&lt;/a>.&lt;/p>
&lt;p>Pete talked through a solution (PFCATK) he had developed for auditing the oracle database. This appears to be
currently in development and not available for general use. He seemed inclined to release
the core tool and sell a pretty front end or consultancy, but it seemed he hadn&amp;rsquo;t yet
decided. The lack of anything to play with (Unless you ask for a copy of the
tool and agree to install it and give feedback) made this session less
interesting than it might otherwise be.&lt;/p></description></item><item><title>Tech 17 -The Answer to the Ultimate Question of SQL, Performance Tuning and Everything</title><link>https://curiousdba.netlify.app/post/tech17performance/</link><pubDate>Thu, 07 Dec 2017 14:41:38 +0000</pubDate><guid>https://curiousdba.netlify.app/post/tech17performance/</guid><description>&lt;p>This is second session I attended in Tech 17. It was
presented by Martin Bach and &lt;a href="http://blog.psftdba.com">David Kurtz&lt;/a>. The answer is &lt;a href="https://carlos-sierra.net/2014/07/27/edb360/">eDB360&lt;/a>.
The session was in two
parts with a presentation by Martin, then a demo with David.&lt;/p>
&lt;p>Martin discussed the problems of doing a database health check, particularly
for a third party company who may not actually have access to the database.
It needs a standard approach, which is consistent across databases, and
repeatable. Ideally performance data in AWR should be persisted for just over
a year so that the performance of annual business cycles can be compared
e.g., year end for financial systems.&lt;/p></description></item><item><title>Tech17 - Cost Based Optimizer - The Panel session</title><link>https://curiousdba.netlify.app/post/tech17cbopanel/</link><pubDate>Thu, 07 Dec 2017 14:31:18 +0000</pubDate><guid>https://curiousdba.netlify.app/post/tech17cbopanel/</guid><description>&lt;p>On Wednesday 5th December, I attended
&lt;a href="https://web.archive.org/web/20190223101743/http://tech17.ukoug.org/">Tech 17&lt;/a>.
While it is a pain to organise getting there and back, I found in previous
years that it was useful for me to go and find out what is happening in the
industry.&lt;/p>
&lt;h1 id="cost-based-optimisation---the-panel-session">Cost Based Optimisation - The Panel Session&lt;/h1>
&lt;p>Panelists:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://jonathanlewis.wordpress.com/">Jonathan Lewis&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://antognini.ch/">Christian Antognini&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://richardfoote.wordpress.com/" title="Richard Foote Consulting">Richard Foote&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://blogs.oracle.com/optimizer/oracle-optimizer-2" title="Oracle">Nigel Bayliss&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://sqlmaria.com/">Maria Colgan&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="slow-start">Slow Start&lt;/h2>
&lt;p>This took questions from the internet and the audience, so it is a bit
variable. The question has to match something the panel can talk about.
The first questions about the Autonomous database was disappointing
in this regard as very little information has been released about it,
and the Oracle employees had to stick to the company line, so couldn&amp;rsquo;t
speculate.&lt;/p></description></item><item><title>Broken PeopleTools Deployment Packages</title><link>https://curiousdba.netlify.app/post/dpks/</link><pubDate>Wed, 08 Nov 2017 12:13:40 +0000</pubDate><guid>https://curiousdba.netlify.app/post/dpks/</guid><description>&lt;p>The October Critical patch saw Oracle release&lt;/p>
&lt;blockquote>
&lt;p>Patch 26743107: PT 8.55.19 PRODUCT PATCH LINUX DPK.&lt;/p>&lt;/blockquote>
&lt;p>This is important
to install because there was a serious security vulnerability in the
performance monitor component which was easily exploitable over the network
without authorisation.&lt;/p>
&lt;p>However, once the DPK was installed, looking at the Weblogic home, we can see
that the October critical patch&lt;/p>
&lt;blockquote>
&lt;p>Patch 26519417: WLS PATCH SET UPDATE 12.1.3.0.171017&lt;/p>&lt;/blockquote>
&lt;p>hasn&amp;rsquo;t been applied. It would be nice if it
was delivered fully patched, but presumably Oracle&amp;rsquo;s internal time scales don&amp;rsquo;t
allow this, so I will have to patch it myself.&lt;/p></description></item><item><title>SessionHistory</title><link>https://curiousdba.netlify.app/post/sessionhistory/</link><pubDate>Mon, 18 Sep 2017 10:14:21 +0100</pubDate><guid>https://curiousdba.netlify.app/post/sessionhistory/</guid><description>&lt;p>Here is another note to myself about how to look at what sessions were doing over time.&lt;/p>
&lt;p>The situation was that we saw a lot of blocking sessions during a performance
test. The developer wants information about the blocking sessions. To do this
we want historical information from v$session, which helpfully tells us the
blocking session, and also the SQL being run. This can be sampled every so often
using a simple script, but Oracle have already thought about this and created
v$active_session_history which you can use if you have licensed the Diagnostics pack.&lt;/p></description></item><item><title>PeoplesoftPerformance</title><link>https://curiousdba.netlify.app/post/peoplesoftperformance/</link><pubDate>Wed, 16 Aug 2017 17:37:19 +0100</pubDate><guid>https://curiousdba.netlify.app/post/peoplesoftperformance/</guid><description>&lt;h1 id="peoplesoft-performance">PeopleSoft Performance&lt;/h1>
&lt;p>Occasionally I have to diagnose a performance issue in PeopleSoft. This is a reminder to myself of the tools available and what I can check.&lt;/p>
&lt;h2 id="peoplesoft-ping">PeopleSoft Ping&lt;/h2>
&lt;p>This is a really useful tool because it gives real performance indications as to how the system as a whole is performing from the desktop to the database.
The user can see the time taken at the browser, web server, application server and the database server for a simple query. When a slow response time is seen
it is important to drill down to see what cause it. It could just be Windows downloading updates for example. PeopleSoft ping data is stored in the database
used by the application in the table sysadm.ps_ptp_tst_cases. I used the following columns
(See &lt;a href="https://www2.go-faster.co.uk/peopletools/ptp_tst_cases.htm">Dave Kurtz&amp;rsquo; website&lt;/a> for the rest).&lt;/p></description></item><item><title>ApacheUcamWebauth</title><link>https://curiousdba.netlify.app/post/apacheucamwebauth/</link><pubDate>Fri, 11 Aug 2017 17:18:34 +0100</pubDate><guid>https://curiousdba.netlify.app/post/apacheucamwebauth/</guid><description>&lt;h1 id="installing-apache-and-ucam-webauth-on-centosrhel7">Installing Apache and Ucam Webauth on Centos/RHEL7&lt;/h1>
&lt;p>Apache is pretty easy:&lt;/p>
&lt;div class="highlight-container">

 &lt;button class="copy-code-btn outline">Copy&lt;/button>

 
 &lt;pre tabindex="0">&lt;code> yum install httpd&lt;/code>&lt;/pre>
&lt;/div>
&lt;p>Done.&lt;/p>
&lt;h2 id="ucam-webauth">Ucam Webauth&lt;/h2>
&lt;p>It is &lt;a href="https://github.com/cambridgeuniversity/mod_ucam_webauth">hosted on github&lt;/a>, but won&amp;rsquo;t be much use to anyone
who doesn&amp;rsquo;t have a need to authenticate users with the University of Cambridge&amp;rsquo;s single sign on which is called raven.&lt;/p>
&lt;p>I downloaded the SRPM from the &lt;a href="http://raven.cam.ac.uk/project/apache/">raven page&lt;/a> as suggested, and
compiled it. The following packages are prerequisites. I used the follwing ansible task:&lt;/p></description></item><item><title>DBLinks</title><link>https://curiousdba.netlify.app/post/dblinks/</link><pubDate>Fri, 28 Jul 2017 10:01:33 +0100</pubDate><guid>https://curiousdba.netlify.app/post/dblinks/</guid><description>&lt;h1 id="database-links">Database Links&lt;/h1>
&lt;p>Our PeopleSoft system suddenly started showing spikes in network usage. Users were complaining of slow performance. Enterprise manager shows big spikes in network waits. Strangely these don&amp;rsquo;t seem to be reflected in the SQL. The table on the left doesn&amp;rsquo;t have as much beige/grey as the one on the right.&lt;/p>
&lt;p>&lt;img src="../../dblinks/oem.jpg" alt="Oracle enterprise manager showing network waits">&lt;/p>
&lt;p>Lets click on network and see what the waits really are. SQL*Net message from dblink.&lt;/p></description></item><item><title>Criticalpatch</title><link>https://curiousdba.netlify.app/post/criticalpatch/</link><pubDate>Fri, 21 Jul 2017 11:02:09 +0100</pubDate><guid>https://curiousdba.netlify.app/post/criticalpatch/</guid><description>&lt;h1 id="oracle-critical-patches">Oracle Critical Patches&lt;/h1>
&lt;p>It was critical patch Tuesday this week. Because of the time differences
between here and the USA we actually only get to find out about the critical
patches on Wednesday, though there is a pre release announcement.&lt;/p>
&lt;p>With software as
complex as Oracles you can pretty much guarantee that
there will be serious bugs somewhere in there which need patching every
quarter.&lt;/p>
&lt;p>Considering the types of organisations that run Oracle - the ones who can afford
to pay the license fees, i.e. rich and powerful ones, you can be sure
that someone is looking into what changed for each release, and how they
can benefit from stealing or changing information.&lt;/p></description></item><item><title>Jenkins On Centos</title><link>https://curiousdba.netlify.app/post/jenkinsoncentos/</link><pubDate>Fri, 14 Jul 2017 16:40:55 +0100</pubDate><guid>https://curiousdba.netlify.app/post/jenkinsoncentos/</guid><description>&lt;h1 id="install-jenkins-automatically">Install Jenkins. Automatically?&lt;/h1>
&lt;p>The documentation for Jenkins is pretty sparse, but fortunately a colleague had set up Jenkins already, and was able
to give me some pointers.&lt;/p>
&lt;p>The idea is to use the Apache web server as a reverse proxy to access Jenkins. This can also take care of user
authentication.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;p>So first of all &lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html">download Java from Oracle&lt;/a>. I download it manually and keep it in case the link changes. I use the RPM and install it with yum. Note
that there isn&amp;rsquo;t an easy way to automate this. There is no repository for Java which means you have to check every
quarter, when Oracle release their &lt;a href="https://www.oracle.com/technetwork/topics/security/alerts-086861.html">Critical Patches&lt;/a> then download and update it.&lt;/p></description></item><item><title>Automation</title><link>https://curiousdba.netlify.app/post/automation/</link><pubDate>Tue, 11 Jul 2017 16:33:32 +0100</pubDate><guid>https://curiousdba.netlify.app/post/automation/</guid><description>&lt;h1 id="automating-the-build-of-new-environments">Automating The Build of New Environments.&lt;/h1>
&lt;h2 id="the-problem">The Problem&lt;/h2>
&lt;p>I look after a &lt;a href="http://www.oracle.com/us/products/applications/peoplesoft-enterprise/overview/index.html">Peoplesoft&lt;/a>
&lt;a href="http://www.oracle.com/us/products/applications/peoplesoft-enterprise/campus-solutions/overview/index.html">Campus Solutions&lt;/a>
system, which we call &lt;a href="http://www.camsis.cam.ac.uk">CamSIS&lt;/a>. This is the student records system for the
&lt;a href="http://www.cam.ac.uk">University of Cambridge&lt;/a>. It is a pretty important system, as it is core to the mission of the
University. This means that there is always some kind of work going on to improve it, upgrade it, or add new functionality.&lt;/p>
&lt;p>Having a lot of changes, and work going on means there are a lot of test, development and training environments. Normally
there are about 20, during large projects there can be even more than this.&lt;/p></description></item></channel></rss>