Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I have multiple databases on oracle express edition

Can I have multiple databases on oracle express edition? Please let me know what are steps to setup?

like image 323
Naga Avatar asked Aug 03 '12 20:08

Naga


2 Answers

No. You can only have one XE database per server. You can have as many schemas in that database as you'd like. If you are coming from a background in other databases, what most databases refer to as a database is most equivalent to what Oracle refers to as a schema.

like image 134
Justin Cave Avatar answered Nov 08 '22 16:11

Justin Cave


We were using separate virtual machine instances with Windows XP installed to create multiple oracle xe databases. However virtual machines consume too much memory for that simple task.

Now I'm using docker. Below you can find the docker image I'm currently using:

https://github.com/MaksymBilenko/docker-oracle-xe-11g

After you install docker to your computer, you can use the following commands to create the database:

# Create a folder for data in your home folder or somewhere else
mkdir /home/sedran/mydb1

# Download the docker image
docker pull sath89/oracle-xe-11g

# Create and start a new container with oracle-xe running on it
docker run --name oracle11g_mydb1 -d -p 1522:1521 -p 49163:8080 -v /home/sedran/mydb1:/u01/app/oracle sath89/oracle-xe-11g

Then you can connect to this DB from localhost:1522/XE

To create a second database, execute the following commands:

mkdir /home/sedran/mydb2
docker run --name oracle11g_mydb2 -d -p 1523:1521 -p 49164:8080 -v /home/sedran/mydb2:/u01/app/oracle sath89/oracle-xe-11g

The new DB will listen to port 1523 on localhost.

Do not forget to assign different ports, names and data folders (volumes) to every container.

like image 45
sedran Avatar answered Nov 08 '22 15:11

sedran