- from this link https://github.com/wnameless/docker-oracle-xe-11g
docker pull wnameless/oracle-xe-11g
Run with 22 and 1521 ports opened:
docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
Connect database with following setting:
hostname: localhost
port: 49161
sid: xe
username: system
password: oracle
Password for SYS
oracle
Login by SSH
ssh root@localhost -p 49160
password: admin
Check size of vm
ssh into machine
find /var/lib/jbossas/domain -maxdepth 2 -type d -exec du -sh {} \;
find / -maxdepth 1 -type d -exec du -sh {} \;
delete the oracle install file from /tmp (to save some space)
To extend oracle tablespace
--check possble dbf
--find /u01/app/oracle/oradata -iname *.dbf
--login as sys dba in sql client and run these
ALTER TABLESPACE USERS
ADD DATAFILE '/u01/app/oracle/oradata/XE/users-x1.dbf'
SIZE 300M
AUTOEXTEND ON NEXT 4M
MAXSIZE 8G;
--extend UNDO Space
ALTER TABLESPACE UNDOTBS1
ADD DATAFILE '/u01/app/oracle/oradata/XE/undotbs1-x1.dbf'
SIZE 100M
AUTOEXTEND ON NEXT 4M
MAXSIZE 2G;f
--extend SYSTEM Space
ALTER TABLESPACE SYSTEM
ADD DATAFILE '/u01/app/oracle/oradata/XE/system-x1.dbf'
SIZE 100M
AUTOEXTEND ON NEXT 4M
MAXSIZE 3G;
CREATE BIGFILE TABLESPACE CTEST1
DATAFILE '/u01/app/oracle/oradata/XE/ctest1.data'
SIZE 300M
AUTOEXTEND ON NEXT 4M;
CREATE BIGFILE TABLESPACE GTEST1
DATAFILE '/u01/app/oracle/oradata/XE/gtest1.data'
SIZE 300M
AUTOEXTEND ON NEXT 4M;
- NOTE: YouCANNOT create another SID on xe version (it only allows ONE)
- To RESTART ORacle XE
- ssh into container and as root
sudo /etc/init.d/oracle-xe status
sudo /etc/init.d/oracle-xe restart
To delete all images from local docker
sudo docker rm `sudo docker ps -a -q`
sudo service docker restart
sudo docker rmi `sudo docker images -a -q`