Description
I have created two containers created from the same "oracle/database 12.2.0.1-se2" image. The image was built on Windows 10 OS and I am running Docker For Windows Version 17.06.0-ce-win19 (12801).
- The first container does not have a volume mapped for the database files:
docker run --name oracle1 -p 1521:1521 -p 5500:5500 -e ORACLE_SID=DEV -e ORACLE_PDB=TRUNK -e ORACLE_PWD=Databas3 -e ORACLE_CHARACTERSET=AL32UTF8 oracle/database:12.2.0.1-se2
and I can connect to the database running in the first container as:
E:\wfm\trunk\workspace\weblogic>docker exec -ti -u oracle oracle1 sqlplus SYS/Databas3@//localhost:1521/DEV AS SYSDBA
SQL*Plus: Release 12.2.0.1.0 Production on Wed Aug 2 19:43:00 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
SQL>
- The second container does have a volume mapped for database files:
docker run --name oracle2 -p 1521:1521 -p 5500:5500 -e ORACLE_SID=DEV -e ORACLE_PDB=TRUNK -e ORACLE_PWD=Databas3 -e ORACLE_CHARACTERSET=AL32UTF8 -v E:\wfm\trunk\workspace\weblogic\database\oracle\oradata:/opt/oracle/oradata oracle/database:12.2.0.1-se2
and when I try to connect to the database running in the second container as I get the following error:
E:\wfm\trunk\workspace\weblogic>docker exec -ti -u oracle oracle2 sqlplus SYS/Databas3@//localhost:1521/DEV AS SYSDBA
SQL*Plus: Release 12.2.0.1.0 Production on Wed Aug 2 19:19:08 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
I also get the same error when I try to connect from my windows host:
E:\wfm\trunk\workspace\weblogic>sqlplus SYS/Databas3@//localhost:1521/DEV AS SYSDBA
SQL*Plus: Release 12.2.0.1.0 Production on Wed Aug 2 19:19:08 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
I can connect to either database locally (inside the container) using the syntax:
sqlplus / as sysdba
This isn't blocking issue for me as I can work-around this by executing sql scripts as sysdba locally inside the container, but this might be a bigger concern for others that may not be able to do the same in their environments.