背景
国产化的浪潮,也打到了我的头上
安装步骤
Oracle
bash
docker run -d -p 1521:1521 -p 8080:8080 --name oracle_11g -e ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2 -e ORACLE_SID=helowin registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
SQL Server
bash
sudo docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Zcyc123456' -p 1433:1433 -v ~/mssqlvol/data:/var/opt/mssql/data -v ~/mssqlvol/log:/var/opt/mssql/log -v ~/mssqlvol/secrets:/var/opt/mssql/secrets -d mcr.microsoft.com/mssql/server:2019-latest
Oracle安装完成后进入容器进行设置
创建空间(可选步骤)
bash
CREATE TABLESPACE SANMENG LOGGING DATAFILE '/home/oracle/app/oracle/oradata/helowin/SANMENG.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL;
创建用户
bash
create user sys identified by system default tablespace ;
为用户设置表空间
bash
create user SANMENG identified by SANMENG default tablespace SANMENG;
设置用户权限
bash
grant dba to SANMENG;