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:
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
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
④. Enter the image for configuration1. docker exec -it oracle11g bash 2. Make a soft connection
I found that there is no such command and it cannot be used. 3. Switch to the root user
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
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
Then execute the following command
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:
Note: There may also be a prompt here:
No rush! continue! =========== Solution=========== Input: alter database mount; Input: alter database open; Then you can execute the command to change the database password
Refresh the following table exit is to retire sql soft connection ⑥. Use pl/sql to connectNavicat 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:
|
<<: MySQL 1130 exception, unable to log in remotely solution
>>: Use the CSS Paint API to dynamically create resolution-independent, variable background effects
statement : This article teaches you how to imple...
When vue2 converts timestamps, it generally uses ...
Optimistic Locking Optimistic locking is mostly i...
MySQL supports hash and btree indexes. InnoDB and...
1. Edit the docker.service file vi /usr/lib/syste...
Table of contents Integrity constraints Definitio...
In actual development or production environments,...
What I want to share today is to use native JS to...
Table of contents Boolean Type Number Types Strin...
Some common statements for viewing transactions a...
1. Download the CentOS image 1.1 Download website...
This article example shares the specific code for...
The configuration is very simple, but I have to c...
Preface The role of process management: Determine...
1. Make sure the network connection method is bri...