Can I have multiple databases on oracle express edition

血红的双手。 提交于 2019-12-10 01:50:04

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/11803190/can-i-have-multiple-databases-on-oracle-express-edition

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!