ã¡ãã£ã¨ããè©ä¾¡ã®ããã«Oracleãã¼ã¿ãã¼ã¹ã®ç°å¢ã欲ãããªãã¾ããã
ãã ãèªåã®PCã«Oracleãã¤ã³ã¹ãã¼ã«ããããªããªããããã ãDocker使ãã°ãããããªãï¼
ã¨ããããã§ãã¡ããã£ã¨ã³ã³ããèµ·åããã¨ããã¾ã§ã¾ã¨ãã¦ãããã¨æãã¾ãã
åèæ å ±
äºåæºå
Oracleã¢ã«ã¦ã³ãã®ä½æ
ã¤ã¡ã¼ã¸ããã¦ã³ãã¼ãããã®ã«Oracleã®ã¢ã«ã¦ã³ããå¿ è¦ã§ãã Oracleã®ããããã¼ã¸ãããã¢ã«ã¦ã³ããä½æãã¦ããã¾ãããã
è¦ç´ã¸ã®åæ
Oracle Container Registry ã«ã¦ãOracleã¢ã«ã¦ã³ãã§ãã°ã¤ã³ãã欲ããã¤ã¡ã¼ã¸ãé¸æãã¦è¦ç´ã«åæãã¦ããã¾ãã
åæãã¦ãããªãã¨ã¤ã¡ã¼ã¸ããã¦ã³ãã¼ãããã¨ãã«æããã¾ãã
ã¤ã¡ã¼ã¸åå¾
Oracleã®ãªãã¸ããªã«ãã°ã¤ã³ãã¦ãã¤ã¡ã¼ã¸ãåå¾ãã¾ãã
> docker login container-registry.oracle.com > docker pull container-registry.oracle.com/database/standard
ãã®ã¤ã¡ã¼ã¸ãããã§ããã§ãã4.7GBãããããã¾ãã®ã§ãã¾ã£ããåå¾ãã¾ãããã
ã³ã³ããä½æï¼èµ·å
èµ·åæã®ãã©ã¡ã¼ã¿ç㯠Oracle Database Standard Edition 2 ã«æ¸ãã¦ããã¾ãã®ã§ãã£ã¡ãè¦ã¦ãã ããã
> docker run -d --name ora12c -p 1521:1521 --shm-size="4g" container-registry.oracle.com/database/standard
ã³ã³ã½ã¼ã«ã«æ¥ç¶ãã¦ã¦ã¼ã¶ä½æãªã©
> docker exec -it ora12c bash # su - oracle $ export ORACLE_SID=ORCL $ sqlplus / as sysdba SQL> SHOW CON_NAME; CON_NAME ------------------------------ CDB$ROOT SQL> select name, open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PDB1 READ WRITE SQL> ALTER SESSION SET CONTAINER=PDB1; Session altered. SQL> SHOW CON_NAME; CON_NAME ------------------------------ PDB1 SQL> CREATE USER scott IDENTIFIED BY tiger; User created. SQL> GRANT CONNECT , RESOURCE TO scott; Grant succeeded.
ã³ã³ãããä½æããéãoracleã¦ã¼ã¶ã¼ã¸ã®suããOracleã¸ã®æ¥ç¶ãã§ããããã«ãªãã¾ã§çµæ§æéããããã¾ããã¨ã©ã¼ã«ãªã£ã¦ãç¦ããããã°ããçµã£ã¦ãããªãã©ã¤ãã¾ãããã
ããã¾ã§æ¥ãããã¨ã¯ä½¿ãã ãã§ããã
ã¾ã¨ã
ã¤ã¡ã¼ã¸ã®åå¾ãã³ã³ããã®ä½æã«ã¯ãããªãã«æéããããã¾ãããããã§ããã¼ã«ã«PCã«ç°å¢ä½ãã®ã«æ¯ã¹ãã¨ã ãã¶æ¥½ã«ãªã£ããªãã¨æãã¾ãããæè¿ç°å¢ä½ã£ã¦ãªãã®ã§æ£ç´ä½ã¨ãï¼ç¬
ã§ããä½ã£ã¦æ¨ã¦ã¦ãæ°è»½ã«ã§ããã®ã¯ããã§ããï¼æ並
ããã¾ã