Video : Vagrant : Oracle Database Build (19c on OL8)

Today’s video is an example of using Vagrant to perform an Oracle database build.

In this example I was using Oracle 19c on Oracle Linux 8. It also installs APEX 19.1, ORDS 19.2, SQLcl 19.2, with ORDS running on Tomcat 9 and OpenJDK 12.

If you’re new to Vagrant, there is an introduction video here. There’s also an article if you prefer to read that.

If you want to play around with some of my other Vagrant builds, you can find them here.

If you want to read about some of the individual pieces that make up this build, you can find them here.

The star of today’s video is Noel Portugal. It’s been far too long since I’ve seen you dude!

Cheers

Tim…

ORDS, SQLcl, SQL Developer 19.2 (Vagrant and Docker Builds)

The folks at Oracle dropped some new presents for us today, including version 19.2 of the following.

I’ve updated my Vagrant builds and ORDS Docker builds with the new versions and everything seems to be working fine so far.

Tomorrow I’ll probably try out some of our development ORDS containers with these releases and see how they work out. They are similar to this build, so I’m sure they will be fine…

Cheers

Tim…

Update: I rolled ORDS 19.2 out to all our Dev/Test environments this morning. We run them all on Docker, so it was really quick and easy. 🙂

Docker : New Builds Using Oracle Linux 8 (oraclelinux:8-slim)

Yesterday I noticed the oraclelinux section on Docker Hub included “oraclelinux:8-slim”, so when I got home a did a quick run through some builds using it.

  • ol8_ords : This build is based on “oraclelinux:8-slim” and includes OpenJDK 12, Tomcat 9, ORDS 19, SQLcl 19 and the APEX 19 images.
  • ol8_19 : This build is based on “oraclelinux:8-slim” and includes the 19c database and APEX 19.
  • ol8_183 : This build is based on “oraclelinux:8-slim” and includes the 18c database and APEX 19.

There are also some new compose files, so I could test database and ORDS containers working together.

Everything worked fine, but here come the inevitable warnings and comments.

  • The Oracle database is not certified on Oracle Linux 8 yet, so the database builds are just for playing around, not a recommendation.
  • The database preinstall packages don’t exist yet, so I installed the main required packages with DNF, but I didn’t do some of the additional manual setup I would normally do, so it’s not a perfect example of an installation. I assume the preinstall packages will eventually be released, and I will substitute them in.
  • The ORDS build is not subject to the same certification restrictions as the database, so as far as I know, I could consider using this, although the build I use for work differs a little to this and is still using Oracle JDK 8 and Tomcat 8.5.

If you are interested in playing around with Docker, you can find my articles on it here, and my public builds here.

Cheers

Tim…

Oracle Database 18.7 Patch : Summary

I wrote a bunch of angry tweets yesterday about the 18.7 patch, which probably weren’t very coherent. I just thought I would summarise them here.

Before we start, I think it’s worth saying I try to keep things as vanilla as possible, so we rarely have problems with patches. I guess this is why I launched into these so quickly, and was surprised by how much hassle I had. So far I’ve only been doing the 18.7 patches on servers running OL6 (hence not upgraded to 19c yet). I have no idea at this point if patches for 19c and the lingering 12.1 instances will have problems or not (see updates below).

Issue 1

A few days ago I had upgraded a development database from 12.1.0.2 to 18.6. The upgrade went fine. No worries. Yesterday I patched that same instance from 18.6 to 18.7. The datapatch run complained about invalid objects, specifically some of our packages (not Oracle packages) that were invalid, because database links they referenced were not working.

The schema in question contains some archived tables and code, and the servers these DB links reference no longer exist. In an ideal world all this would be cleaned up, but that would take development time that we don’t have. Welcome to the real world.

At the end of the datapatch run the PDB was left in restricted mode, so I did the following.

  • Granted restricted session to the user.
  • Proxied in.
  • Dropped the invalid objects in question.
  • Revoked restricted session from the user.
  • Ran datapatch again.

At the end of that I had a functioning instance.

That sounds like it was relatively smooth and controlled, but of there was lots of checking log files, Googling for bugs and all that stuff before I eventually just dropped the objects and moved on.

Issue 2 (Issue 1b)

The second issue was a kind-of rerun of the first. This time it was an upgrade from 12.1.0.2 to 18.7 directly. This instance was similar to the previous one, as they were both clones of the same production instance. Unfortunately, I was doing this at the same time as the patch, so I couldn’t learn the lesson from the previous one.

The upgrade went fine until datapatch ran, then boom. Same problem has before. Also, same resolution, so I got through this pretty quick.

If I had completed the patch before starting this upgrade, I might have got though this with the preemptive cleanup, but maybe not. See Issue 3.

Issue 3

Having got through two development databases and learned the lessons, I did a preemptive cleanup of the offending objects from the UAT instance. It also was based on a clone of the same production database as the previous two.

Having done the clean-up, I started the upgrade from 12.1.0.2 to 18.7 feeling pretty confident.

The upgrade went fine, but when it ran datapatch it failed with an issue that looked very much like that described in this MOS note Doc ID 2054286.1.

I say “looked very much like”, rather than “was this”, because that issue relates to patching multiple instances on the same machine at the same time. This was datapatch running against a single instance on this machine. The symptom looked the same…

The resolution for this was to run datapatch again. It just ran through fine. No drama.

Conclusion

I’m not looking forward to upgrading the production instance to 18.7. All these databases were clones of it, so I suspect I’m going to have some drama. Luckily the project can tolerate some downtime.

I’m also curious how the 12.1.0.2 and 19c patches are going to play out… (see updates below).

So if you were following my various rants on Twitter yesterday and wondered why I was so angry, this is why. Keep in mind also, these were “background tasks” I threw in on top of the rest of the stuff I was meant to be doing yesterday.

I hope this was just a problem with my instances or me, not indicative of the quality of the patch. It is interesting that 18.6 was happy with it, but 18.7 was a nightmare…

Good luck everyone, and remember, don’t give me a job. I can’t be trusted… 🙂

Cheers

Tim…

Update 1: Sven-Olaf Hilmer wrote on Twitter.

“I have a problem with 12.1.0.2.190716DBBP. RMAN crashes on all patched DBs. Rollback to 190416 solves the problem. SR filed. 11.2, 12.2.0.1, 18, 19 are not affected.”

Update 2: Anil Vejendla wrote on Twitter.

“We are facing restricted mode issue for 12.2 after applying July patch and even after rollback also issue still persists.”

Dbvisit 9.0.02 : Automatic Failover

I recently wrote about the release of Dbvisit 9, where I included a simple installation article and Vagrant build to get it up and running.

Yesterday I got an email about version 9.0.02, or 9.0.2 depending on how you want to write it. The interesting thing about this release is the introduction of an observer, which enables automatic failover. If you want to try it, there is a free trial available here.

Not surprisingly, the installation is very similar to the previous version, so I’ve updated my original article, and added the observer installation, setup and a quick automatic failover test.

I had to redo the screen shots as the “Configuratons” screen has changed a little to include the observer. I really don’t like taking screen shots!

My existing Vagrant build (here) worked fine. All I had to do was swap the version of the software in the directory, and Bob’s your uncle! Of course, that didn’t install and start the observer, so I did a couple of tweaks and now it does. If you fancy having a play with Dbvisit Standby, this Vagrant build is a really easy way to do it.

Happy days!

Cheers

Tim…

Video : AVG, MEDIAN, MIN and MAX : Problem Solving using Analytic Functions

In today’s video we take a quick look at the AVG, MEDIAN, MIN and MAX aggregate and analytic functions.

You can get more information on these and more analytic functions here.

The star of today’s video is Sten Vesterli, in one of the rare moments at OpenWorld when he’s not in a wetsuit. 🙂

Cheers

Tim…

Video : FIRST_VALUE and LAST_VALUE : Problem Solving using Analytic Functions

Today’s video is a quick run through the FIRST_VALUE and LAST_VALUE analytic functions.

You can find more information about these and other analytic functions in the following articles.

The star of today’s video is Lonneke Dikmans. She probably won’t believe me, but I probably quote/paraphrase her advice more often than any other person in the Oracle space.

Cheers

Tim…

Video : LAG and LEAD : Problem Solving using Analytic Functions

Today’s video gives a quick demo of the LAG and LEAD analytic functions.

There is more information about these and other analytic functions in the following articles.

The star of today’s video is Gwen (Chen) Shapira of Kafka fame!

Cheers

Tim…

Video : Ranking using RANK, DENSE_RANK and ROW_NUMBER : Problem Solving using Analytic Functions

Today’s video is a run through ranking data using the RANK, DENSE_RANK and ROW_NUMBER analytic functions.

There is more information about these and other analytic functions in the following articles.

The star of today’s video is Chris Saxon, who is one of the folks keeping the masses up to speed at AskTom.

Cheers

Tim…

Dbvisit Standby 9 Installation on Linux (and Vagrant)

The folks at Dbvisit recently released version 9 of their Dbvisit standby product.

It’s been a while since I last played with the product, so I downloaded the free trial and gave it a whirl.

I have to admit I forgot just how easy it is to work with. It feels pretty much like “unzip and go”. The result of my playtime was this article.

I also knocked up a Vagrant build, so I can easily recreate it. You can find that here.

I stuck to a basic configuration of a single instance primary (node1) and standby (node2), with the console on a separate VM (console). If you want to try something more exotic, or you are using Windows, you can get more information from the Installing Dbvisit Standby documentation.

Cheers

Tim…

PS. This isn’t a sponsored post. I’ve known the folks at Dbvisit for years so I keep an eye on what they are doing.