Oracle Setup Configuration

Preparing for Setup

At the moment, Oracle has moved own containers to a separate repositories. In order to use the Oracle database container, we need to take a few preliminary steps.

Go to repository page. Sign in (or sign up, if you have not Oracle account already).

Select Database category

To install, we need an enterprise container. Click on the “Сontinue” button.

Very carefully read the agreement;)

And click on the “Accept” button in the bottom.

After carrying out this operation, we should see the following picture.

Now we can click on the enterprise repository and choose containers with available versions for further installing.

In order to be able to download an image, you need to log in to the corresponding repository:

docker login -u {-LOGIN-} -p {-PASSWORD-}

where {-LOGIN-} and {-PASSWORD-} - credentials, that were used in the registration process.

Database Container Launch

The container is started using the docker command with the appropriate settings:

docker run --name oracle- -p 2521:1521 -p 5600:5500 -d

Let's consider each of these parameters:

--name oracle- - container name. Consists of the database type oracle and version

-p 2521:1521 - using this parameter, we set the port that will provide access to the container. 2521 - external port on which this container will be available.

WARNING Before deploying a container to a specific port, you need to make sure that this port is free and not used by other containers. You can use docker ps -a to view all running and stopped containers.

1521 - the port on which the database is accessible inside the container. Thus, we forward requests from an external port to an open port inside the container.

-d - mean “detach”, we run container in background - indicate the Oracle image from Oracle Database Enterprise Repository (see previous step).

As a result of execution, we will see the following console picture:

WARNING After starting the container, we need to make sure that its initialization was successful. To do this, we can use the command:

docker logs --since 30m oracle-

Initialization may take a long time. The picture of successful completion of initialization is as follows:

Database Console Launch

Logging into the Oracle console of a docker container is done using the command:

As a result, we will observe the following picture in the console:

Setting Up The database and Access Mode

The database is configured using sequential execution of SQL queries.

Change the password for the administrator account (sys) by running the following command:

{STRONG_SYS_PASSWORD} - the administrator password.

In order to avoid possible problems during configuration, we will perform the following operation:

This is necessary for the subsequent creation of the user.

Let's create a tablespace for our database:

SIZE - tablespace size.

AUTOEXTEND ON NEXT - determine the expansion of the schema when the size is reached.

Let's create a user with which Jira will have access to the database:

{STRONG_USER_PASSWORD} - the user password which will be used for export.

Provide the created user with the appropriate access level:

As a result, we will see the following picture in the console.

You can exit the database by writing quit.

Let's check if we have configured our database correctly and try to connect to it.

Read our step-by-step guide on how to export Jira data to Oracle Database in our blog