Oracle12g も立てる必要がでてきたので、同じく Docker で立ててみる。
DB2 は公式ストアから入手してみたけど、Oracle はこちらの手順でやってみることにします。
そうすると以下の設定で接続できるものができました。
- ポート番号 = 1521/TCP
- Service_Name = ORCLPDB1
- パスワード (SYS, SYSTEM, PDBADMIN) = コンテナの生成ごとに振られるランダム文字列
TNSの接続なら、こういう文字列ですかねえ。
- (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = IPアドレス)(PORT = 1521)))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ORCLPDB1)))
起動したコンテナは Ctrl + C すると一時停止しますが、docker start [コンテナ名]
と実行すれば再開します。
以下では docker run の初回実行時のコマンドとログをメモとして残します。公式ストアから入手する方法は別途試そう。
$ sudo docker run -p 1521:1521 -p 5500:5500 --name Oracle12g -i oracle/database:12.1.0.2-ee Password: ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: (生成されたパスワード) LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 27-FEB-2018 13:03:37 Copyright (c) 1991, 2014, Oracle. All rights reserved. Starting /opt/oracle/product/12.1.0.2/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 12.1.0.2.0 - Production System parameter file is /opt/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora Log messages written to /opt/oracle/diag/tnslsnr/8bd9ba867228/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production Start Date 27-FEB-2018 13:03:38 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /opt/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora Listener Log File /opt/oracle/diag/tnslsnr/8bd9ba867228/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) The listener supports no services The command completed successfully Copying database files 1% complete 2% complete 27% complete Creating and starting Oracle instance 29% complete 32% complete 33% complete 34% complete 38% complete 42% complete 43% complete 45% complete Completing Database Creation 48% complete 51% complete 53% complete 62% complete 64% complete 72% complete Creating Pluggable Databases 78% complete 100% complete Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details. SQL*Plus: Release 12.1.0.2.0 Production on Tue Feb 27 13:30:14 2018 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> System altered. SQL> Pluggable database altered. SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options The Oracle base remains unchanged with value /opt/oracle ######################### DATABASE IS READY TO USE! ######################### The following output is now a tail of the alert.log: Tue Feb 27 13:30:00 2018 XDB initialized. Tue Feb 27 13:30:10 2018 Thread 1 advanced to log sequence 12 (LGWR switch) Current log# 3 seq# 12 mem# 0: /opt/oracle/oradata/ORCLCDB/redo03.log Tue Feb 27 13:30:14 2018 ALTER SYSTEM SET control_files='/opt/oracle/oradata/ORCLCDB/control01.ctl' SCOPE=SPFILE; ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE Completed: ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE Tue Feb 27 13:38:59 2018 Resize operation completed for file# 9, old size 563200K, new size 593920K Tue Feb 27 13:55:17 2018 Warning: VKTM detected a time drift. Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details. Tue Feb 27 13:55:17 2018 Default pga_aggregate_limit value is too high for the amount of physical memory in the system pga_aggregate_limit is 2048 MB limit based on physical memory and SGA usage is 1199 MB