I've been working on setting up a docker container running Oracle DB XE 18.4.0. I have the container built from Oracle's dockerfiles and it is working fine, except that I cannot login using

connect / as sysdba

in a sqlplus prompt from inside the container, but

connect sys as sysdba

does work. The error message that I receive is

ORA-01017: invalid username/password; logon denied

I checked that my $ORACLE_HOME and $ORACLE_SID environment variables were set and they look fine. I'm trying to install APEX in this container and the first error that is displayed when running the install script is the failed login error above where the script runs connect / as sysdba.

When installing Apex on the local instance of Oracle DB on my development environment, Everything works as expected.

I am working from a Windows 10 (1803) machine which is running docker 18.03.0-ce with a VirtualBox 6.0.2 setup.

  • 1
    Sounds like you are trying this with not oracle user, or the environment variable TWO_TASK is set. Jan 21, 2019 at 14:10
  • @BalazsPapp that fixed it! docker exec -it /bin/bash connects as root, so switching to the user oracle fixed the problem. Thank you!
    – Kytech
    Jan 21, 2019 at 23:13

1 Answer 1


Thanks to @BalazsPapp who pointed this out in the comment to my question.

To use conn / as sysdba, I had to be logged in as the user oracle instead of root.

Switching to the oracle user and attempting to login again solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.