Can I have multiple databases on oracle express ed

2019-04-20 01:35发布

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

2条回答
何必那么认真
2楼-- · 2019-04-20 01:48

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.

查看更多
ゆ 、 Hurt°
3楼-- · 2019-04-20 02:05

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.

查看更多
登录 后发表回答