oracle操作
oracle操作
安装oracle
version: '3.1'
services:
oracle:
image: docker.io/jaspeen/oracle-xe-11g
container_name: oracle11g
privileged: true
environment:
- TZ=Asia/Shanghai
- ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
volumes:
- ./data:/u01/app/oracle
ports:
- 1521:1521
restart: always
安装后有个默认实例:xe 默认账号system 默认密码oracle
创建表空间
CREATE TABLESPACE mmp LOGGING DATAFILE '/u01/app/oracle/oradata/XE/mmp.dbf'
SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE unlimited;
创建用户关联表空间
CREATE USER mmp IDENTIFIED BY mmp DEFAULT TABLESPACE mmp;
给用户授权
grant connect,resource,dba to mmp;