1. What I am trying to achieve
Using Docker for Windows (Docker version 19.03.12, build 48a66213fe) I would like to run in parallel two independent Oracle databases. Image that I am using comes from Oracle Container Registy and is a Oracle Database Standard Edition 2.
2. How am I trying to achieve that
I started one container and it is working fine (using default settings). Run command is:
docker run -d -p 1521:1521 -p 5500:5500 --shm-size="8g" --name=oracle --restart=always container-registry.oracle.com/database/standard
And this one is working perfectly fine. I can connect to DB using my app or DB administration tool.
Then I wanted to start different container using the same image and I used command:
docker run -d -p 1527:1521 -p 5507:5500 --shm-size="8g" --name=OraHib --restart=always container-registry.oracle.com/database/standard
Difference is in port numbers, name of container and I added also confuguration file as described in documentation with different SID for this database.
3. What are the results
After waiting a quarter for my new container to start I am trying to connect to new database I receive error:
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
Of course, double checked SID, so I am pretty sure that it is correct.
The container is running:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6047148f17cd container-registry.oracle.com/database/standard "/bin/sh -c '/bin/ba…" 15 minutes ago Up 15 minutes 0.0.0.0:1527->1521/tcp, 0.0.0.0:5507->5500/tcp OraHib
694120faf51c container-registry.oracle.com/database/standard "/bin/sh -c '/bin/ba…" 4 weeks ago Up 3 hours 0.0.0.0:1521->1521/tcp, 0.0.0.0:5500->5500/tcp oracle
What is in docker logs:
docker logs OraHib
User check : root.
Setup Oracle Database
Oracle Database 12.1.0.2 Setup
Tue Oct 6 11:48:21 UTC 2020
Check parameters ......
log file is : /home/oracle/setup/log/paramChk.log
paramChk.sh is done at 0 sec
untar DB bits ......
log file is : /home/oracle/setup/log/untarDB.log
untarDB.sh is done at 117 sec
config DB ......
log file is : /home/oracle/setup/log/configDB.log
ERROR : config DB failed, please check log /home/oracle/setup/log/configDB.log for details!
Tue Oct 6 11:48:21 UTC 2020
User check : root.
Setup Oracle Database
In mentioned configDB.log file there is:
Start Docker DB configuration
Call configDBora.sh to configure as oracle user
Argument(s) Error... Patch not present in the Oracle Home, Rollback cannot proceed
If the patch was applied using -no_inventory option, use -ph option
to specify the patch shiphome location. Use 'opatch rollback -help'
to get more information.
ERROR : ORA- errors detected, config DB ora failed, please check log /home/oracle/setup/log/configDBora.log for details!
Docker DB configuration failed ...
The last log file configDBora.log consists what is in this pastebin - it is a bit longer than the first one.
What I also tried
Multiple different configurations of ports.
Changing SID of database
Tried on different computer
Does anyone have any clue why this seems impossible? I spent a lot of time on that and still don't have a single idea why it cannot run.