fuzziebrain / docker-oracle-xe

Docker build for Oracle Database 18c Express Edition (XE). This project is now archived with the release of version 21c.
MIT License
272 stars 127 forks source link

Add password & user credentials #50

Open kanuku opened 4 years ago

kanuku commented 4 years ago

Hi there,

Thank you for putting so much effort into this project.

As a regular software developer, with none experience working with Oracle DB's, I would have loved to just run a container coming from dockerhub directly....

Again thank you for publishing this project.

JanMeckelholt commented 3 years ago

Hi kanuku,

you can enter the container via:

docker exec -it oracle-xe bash -c "source /home/oracle/.bashrc; bash"

Then to get to the SQL-Shell $ORACLE_HOME/bin/sqlplus sys/Oracle18@localhost/XE as sysdba This is assuming you did not change the password in the Dockerfile.

Here you can create a user and grant him all privileges with:

create user c##testuser identified by testpassword;
grant all privileges to c##testuser;

If you change your mind: drop user c##testuser; ;-)

exit to leave the SQL-Shell and exit to leave the container.

Hope that helps. Jan

PS: Thank you also from my side for the awesome work! :+1: