docker运行oracle xe 11g

图片[1]-docker运行oracle xe 11g-JoyCode 编程小战

quay io:

https://quay.io/repository/maksymbilenko/oracle-xe-11g?tag=latest&tab=tags

拉取镜像:

docker pull quay.io/maksymbilenko/oracle-xe-11g

运行容器:

docker run --name oracle -d \
-p 8080:8080 \
-p 1521:1521 \
-v /home/docker/oracle:/u01/app/oracle \
quay.io/maksymbilenko/oracle-xe-11g

SYS & SYSTEM 账号的密码都是:oracle

PL/SQL Develop登录:

图片[2]-docker运行oracle xe 11g-JoyCode 编程小战

创建临时表空间示例:

CREATE TEMPORARY TABLESPACE nimble_pay_temp
 
TEMPFILE '/u01/app/oracle/oradata/XE/nimble_pay_temp.dbf'
 
SIZE 32M
 
AUTOEXTEND ON
 
NEXT 32M MAXSIZE UNLIMITED
 
EXTENT MANAGEMENT LOCAL;

创建表空间示例:

CREATE TABLESPACE nimble_pay
 
LOGGING
 
DATAFILE '/u01/app/oracle/oradata/XE/nimble_pay.dbf'
 
SIZE 32M
 
AUTOEXTEND ON
 
NEXT 32M MAXSIZE UNLIMITED
 
EXTENT MANAGEMENT LOCAL;

创建用户示例:

CREATE USER maxwoods IDENTIFIED BY maxwoods
 
ACCOUNT UNLOCK
 
DEFAULT TABLESPACE nimble_pay
 
TEMPORARY TABLESPACE nimble_pay_temp;

用户授权示例:

GRANT CONNECT,RESOURCE TO maxwoods;  

进入容器命令行:

docker exec -it oracle /bin/bash

容器中默认时区为UTC,换成上海时间:

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享