Skip to content

gokcenkarasu/oracleDBTester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oracle Database Connection Tester in Container

How to test oracle database connection in 2 minutes

Disclaimer: If you are planning to use this standalone jar version please check your java version in your environment*

1. Summary

This asset is created to show how to test oracle database in 2 minutes. There are two different options you can select: Runnable container version or standalone jar version.

Sometimes deployment processes take long time so it is time consuming to get sucsess or fail results. For example some deployments by using OpenShift operators take 30 minutes to complete. We need to check pre-requirements before the deployment processes.

This assset helps to test oracle db connection on containerized systems.

There are 2 different options to use this tester:

  • Fist one is contianer base system.
  • Second one is Jar base system.

Both of them are using the same java codes of which you can find the details below.

Alt text

2. Java Code

  • I developed Javacode with 1.8 JDK in Eclipse development environment.

    There are 3 Classes to run this jar program.

    ** 1- ConnectionInfo = This is static abstraction class to use collecting data from getting user.

    ** 2- ConnectionOracle = This includes runnable method and is using to get some information from user. it has time units sleep method to wait thread until wait to runnig containers. TimeUnit.SECONDS.sleep(8);

    ** 3- OracleConTest = This is main method which include all conenctions methods.

  There are 3 different approaches for connection test:
  1. It will generate URL string which it will get parameters from you
  2. It will generate URL string without Username and Password
  3. It will generate URL string and properties

If you select one of those options, the program executes only the selected one, if you enter "ALL" keyword, the program executes all of them to test it.

3. Product Versions

This is 1.3 version of the program.

I used Java 1.8 so If you are planning to use this standalone jar version please check your java version in your environment. Also if you want to use container version of the program, you need to have to at least one of these platforms: Docker, Podman, Kubernetes or Openshift.

4. Pre-Requirements


* For Jar version; 
	1.8 Java JRE, Oracle Databese version 19x
	
* For Contanirazed version;
	Openshift 3.x or newer versions, Docker 17.x or newer versions, Kubernetes 1.x or newer versions.

5. How to run container version?

I used IBM JAVA container as a base of this program.

Oracle Test Connection Docker Hub

docker pull gokcenk/oracletestconnection

5.1. In Docker

docker run -it --rm oracledbtester

5.2. In Kubernetes

kubectl run orcl --image=gokcenk/oracledbtester -it --rm

5.2. In Openshift

kubectl run orcl --image=gokcenk/oracledbtester -it --rm

6. How to run container version?

java -jar OracleTestConnection.jar

🧿

About

Oracle Database Connection Tester in Container.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published