编程知识 cdmana.com

Oracle 19C docker compose installation

1、docker-compose.yml

oracle:
  image: heartu41/oracle19c
  container_name: oracle19c
  privileged: true
  environment:
    - TZ=Asia/Shanghai
    - ORACLE_SID=ORCL
    - ORACLE_PDB=ORCLPDB1
    - ORACLE_BASE=/opt/oracle
    - ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
    - PATH=/opt/oracle/product/19c/dbhome_1/bin:/opt/oracle/product/19c/dbhome_1/OPatch/:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
  volumes:
    - /data/oracle19c/oradata:/opt/oracle/oradata
  ports:
    - "1521:1521"
    - "18080:8080"
    - "15313:5500"
  restart: always

2、 Create directory locally /data/oracle19c/oradata    Used to persist data

3、 Common commands

Connect Oracle:sqlplus / as sysdba

Switch to PDB:alter session set container=ORCLPDB1;

Create tablespace :CREATE TABLESPACE HFZF DATAFILE '/opt/oracle/oradata/ORCL/PDBHFZF01.DBF' SIZE 4096M AUTOEXTEND ON NEXT 100M;
CREATE temporary TABLESPACE HFZF_TEMP tempfile '/opt/oracle/oradata/ORCL/PDBHFZF_TEMP.DBF' SIZE 1024M AUTOEXTEND ON NEXT 10M;

Create user :create user HFZF identified by hfzf  default tablespace HFZF Temporary tablespace HFZF_TEMP;

to grant authorization :grant dba to hfzf;

grant connect to hfzf;

Changing the password is permanent :ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

版权声明
本文为[xxjin]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201225144244874c.html

Scroll to Top