Docker 部署 Oracle19c
创建目录
mkdir -p /mydata/oracle/oradata
授权
chmod 777 /mydata/oracle/oradata
启动容器
docker run -d \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_SID=ORCL \
-e ORACLE_PDB=ORCLPDB \
-e ORACLE_PWD=Oracle2023 \
-e ORACLE_EDITION=standard \
-e ORACLE_CHARACTERSET=ZHS16GBK \
-v /mydata/oracle/oradata:/opt/oracle/oradata \
--name oracle \
registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
查看日志
docker logs -ft oracle
管理端
https://ip:5500/em
plsql连接(orcl和orclpdb)
ip:1521/orcl
ip:1521/orclpdb
创建表空间(orcl和orclpdb都要创建)
--orcl
create tablespace ORACLE_DATA datafile '/opt/oracle/oradata/ORCL/ORACLE_DATA_1.DBF' size 128M autoextend on next 32m;
alter tablespace ORACLE_DATA add datafile '/opt/oracle/oradata/ORCL/ORACLE_DATA_2.DBF' size 128M autoextend on next 32m;
--orclpdb
create tablespace ORACLE_DATA datafile '/opt/oracle/oradata/ORCL/ORCLPDB/ORACLE_DATA_1.DBF' size 128M autoextend on next 32m;
alter tablespace ORACLE_DATA add datafile '/opt/oracle/oradata/ORCL/ORCLPDB/ORACLE_DATA_2.DBF' size 128M autoextend on next 32m;
创建用户c##oracle
create user c##oracle
identified by password
default tablespace ORACLE_DATA
temporary tablespace TEMP;
-- Grant/Revoke role privileges
grant resource to c##oracle;
grant dba to c##oracle;
grant connect to c##oracle;
-- Grant/Revoke system privileges
grant unlimited tablespace to c##oracle;
版权声明:
本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自
One piece!
喜欢就支持一下吧