Detailed tutorial on Docker pulling Oracle 11g image configuration

Detailed tutorial on Docker pulling Oracle 11g image configuration

Without further ado

Start recording docker pulling Alibaba's oracle11g image and configuring it.

Use pl/sql to log in as the final result

navicat connection is in the last step

Reference: https://www.jb51.net/article/223375.htm

But there are some problems with this configuration, so I wrote this article to record it, hoping it can help others

start:

①. Start pulling the image-execute command:

docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g

The download process will take a while, so wait, have a cup of coffee and take a break! (Image 6.8G)

After downloading, view the image: docker images

You can see that it has been downloaded

② Create a container

docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g

Let me say here that the address after the command must be the image address you downloaded, that is, the name of the image you pulled, otherwise there will be problems such as the name already exists!

If the creation function is successful, the container id will be returned

③. Start the container

docker start oracle11g

④. Enter the image for configuration

1. docker exec -it oracle11g bash

2. Make a soft connection

sqlplus /nolog

I found that there is no such command and it cannot be used.

3. Switch to the root user

su root

Password: helowin

Note that this is still in the container. . Some friends withdrew. . . . . . .

4. Edit the profile file to configure the ORACLE environment variables

export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
 
export ORACLE_SID=helowin
 
export PATH=$ORACLE_HOME/bin:$PATH 

Add at the end

Save and exit: wq

5. Create a soft link

ln -s $ORACLE_HOME/bin/sqlplus /usr/bin

6. Switch to oracle user

I have to say here that you must write the inner strip in the middle - it is necessary, otherwise the soft link will be invalid

⑤. Log in to sqlplus and modify the passwords of sys and system users

sqlplus /nolog

conn /as sysdba

Then execute the following command

alter user system identified by system;

alter user sys identified by sys;

You can also create a user create user test identified by test;

And grant the user the permission grant connect,resource,dba to test;

Pay attention to the pitfalls here. When executing the password change, the following message appears: database not open

If the database is not open, please follow the steps below.

enter:

alter database open;

Note: There may also be a prompt here:

ORA-01507: database not mounted

No rush! continue!

=========== Solution===========

Input: alter database mount;

Input: alter database open;

Then you can execute the command to change the database password

After the change, enter: ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Refresh the following table

exit is to retire sql soft connection

⑥. Use pl/sql to connect

Navicat connection directly skips step 6 , but Oracle's lsnrctl service is in step 6, so you should still read it and then step 7 (although you don't need to do anything). Step 7 is the last step for Navicat connection.

Previously we mapped the port to 1521, so we need to configure tnsnames.ora

Some friends didn't know where the ora file was, so they added this step

pl/sql installation package, Chinese package, key tool

http://xiazai.jb51.net/202109/yuanma/PLSQL_Developer_jb51.rar

Local download:

https://www.jb51.net/softs/737035.html

plsql installation and configuration toolkit

https://www.jb51.net/article/170088.htm

docker_oracle11=
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.211.135)(PORT = 1521))
   )
   (CONNECT_DATA =
     (SERVICE_NAME = orcl)
   )
)

Open pl/sql to log in: prompt the listener currently cannot recognize the service requested in the connection descriptor

At this time we need to look at Oracle's lsnrctl service

See these two? Choose one and modify the service_name=helowinXDB in tnsnames.ora

docker_oracle11=
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.211.135)(PORT = 1521))
   )
   (CONNECT_DATA =
     (SERVICE_NAME = helowinXDB)
   )
)

OK, login successful.

Step 7 is navicat connection

Some friends use navicat to connect, so I added this step

After opening Navicat (navicat12 does not need to configure the oci.dll file)

Create a new connection directly

This is the end of this article about Docker pulling oracle 11g image configuration. For more relevant Docker oracle 11g image configuration content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to install Oracle_11g using Docker
  • Detailed explanation of installing and configuring Oracle database in Docker
  • Tutorial on installing and configuring Oracle on Docker
  • Analyze the problem of pulling down the Oracle 11g image configuration in Docker

<<:  MySQL 1130 exception, unable to log in remotely solution

>>:  Use the CSS Paint API to dynamically create resolution-independent, variable background effects

Recommend

CSS3 realizes the website product display effect diagram

This article introduces the effect of website pro...

Copy and paste is the enemy of packaging

Before talking about OO, design patterns, and the ...

Ubuntu installation Matlab2020b detailed tutorial and resources

Table of contents 1. Resource files 2. Installati...

Commonplace talk about the usage of MYSQL pattern matching REGEXP and like

like LIKE requires the entire data to match, whil...

Basic learning tutorial of table tag in HTML

Table label composition The table in HTML is comp...

Jmeter connects to the database process diagram

1. Download the MySQL jdbc driver (mysql-connecto...

How to track users with JS

Table of contents 1. Synchronous AJAX 2. Asynchro...

WeChat applet implements a simple calculator

WeChat applet's simple calculator is for your...

The principle and application of ES6 deconstruction assignment

Table of contents Array destructuring assignment ...

Common repair methods for MySQL master-slave replication disconnection

Table of contents 01 Problem Description 02 Solut...

Detailed explanation of MySQL database (based on Ubuntu 14.0.4 LTS 64 bit)

1. Composition and related concepts of MySQL data...

Automatically build and deploy using Docker+Jenkins

This article introduces Docker+Jenkins automatic ...

How to enable remote access in Docker

Docker daemon socket The Docker daemon can listen...

Some experience in building the React Native project framework

React Native is a cross-platform mobile applicati...

Review of the best web design works in 2012 [Part 1]

At the beginning of the new year, I would like to...