Java and JDBC for Oracle DBAs – Part 3: Git, Oracle schemas and your first Java application

Finally we have come to the point where we start to create some Java code. First we’ll install Git, the most widely used modern version control system. We’ll continue to download some code from GitHub to create our Oracle schemas, and then we’ll create a very simple – but our first – Java application. We’ll test compiling and running our code both from Eclipse and from Maven. Finally we’ll extend our application to use the JDBC driver and connect towards our database and our new database schemas.

Continue Reading »

Java and JDBC for Oracle DBAs – Part 2: Java, Eclipse, Maven & JDBC

Today I’ll continue with my series on creating an Java and JDBC test application for Oracle DBAs.

Continue Reading »

Java and JDBC for Oracle DBAs – Part 1: Oracle Database in Docker

Working together with Java developers I sometimes have to test aspects of the JDBC programming. When cooperating with the Java developers it is also very convenient to know some Java. In this blog series I’ll describe how you can build your own Java test application, and how you can get a little more acquainted with the Java world. The blog series will not be a tutorial in Java. You can find several Java tutorials on internet (for instance –

Continue Reading »

Scripts: Tanel Poder´s TPT script out on GitHub

Tanel Poder have uploaded his TPT script to GitHub. If you have never looked as his script I highly recommend spending some time on them. You’ll find them at:

OUGN Bergen Spring Seminar 2018

Now you can download the slides from the OUGN Bergen spring seminar at Bergen Media City the 31st of May 2018.

PLSQL: Anonymous block to reset out-of-sync (too low) sequence

I wrote a short little PLSQL to fix an out-of-sync sequence issue. For some unknown reasons, there was stored primary key values in the database which was way larger than the currval for the dedicated sequence.
Continue Reading »

PLSQL: Using pipelined function to overcome config issue in Apache Solr

Recently I was facing an issue with an SQL coming from Apache Solr. The query was working on delta updates (since last check), and was fired from three different Solr instances keeping 3 cpus pretty busy . The query was one of the top SQLs regarding LIO, and was doing 9 FULL TABLE SCANs (where only two of the tables was relatively small with only 24 and 68 blocks). The query was written into the Solr configuration file, and looked something like this (when caught in v$sql) :

FROM a_big_view
  AND ( :"SYS_B_02" = :"SYS_B_03"
      OR TAB1_UPDATED > to_date(:"SYS_B_04", :"SYS_B_05") 
      OR TAB2_UPDATED > to_date(:"SYS_B_06", :"SYS_B_07")  
      OR TAB3_UPDATED > to_date(:"SYS_B_08", :"SYS_B_09")

Continue Reading »

Java (JPA): Improve statement caching efficiency with IN clause parameter padding

A nice little feature for handling queries with IN-lists, if you are using JPA. There are other and maybe better ways to solve this, but the solution described in the this blog could be worth a look into:

How to improve statement caching efficiency with IN clause parameter padding