環境構築
本家のサイトからイメージデータをダウンロードした後、自力でビルドして出来たイメージを元にdocker-compose up コマンドでセットアップしただけ
特別な設定はしていない
docker-compose.yml
version: '3'
services:
database:
image: oracle/database:12.2.0.1-ee
container_name: oracle
volumes:
- ./oradata:/opt/oracle/oradata # persistent oracle database data.
- ./triple:/triple # persistent oracle database data.
ports:
- 1521:1521
- 8080:8080
- 5500:5500
environment:
- ORACLE_PDB=oracle
- ORACLE_PWD=Oracle12
- SEC_CASE_SENSITIVE_LOGON=TRUE
- SQLNET.ALLOWED_LOGON_VERSION_SERVER=12
#OracleText用のindex作成
OracleText用のindexを作成する
CREATE INDEX myindex ON emp(sentence) INDEXTYPE IS CTXSYS.CONTEXT
SQLでOracleTextを使ってみる
contains関数を使って特定のカラムに含まれる文字列を検索できる。
select count(*) from emp where contains ( triple, '従業者') > 0;
spfileORCLCDB.oraの中身
ORCLCDB.__db_cache_size=1107296256
ORCLCDB.__inmemory_ext_roarea=0
ORCLCDB.__inmemory_ext_rwarea=0
ORCLCDB.__java_pool_size=16777216
ORCLCDB.__large_pool_size=33554432
ORCLCDB.__oracle_base='/opt/oracle'#ORACLE_BASE set from environment
ORCLCDB.__pga_aggregate_target=536870912
ORCLCDB.__sga_target=1610612736
ORCLCDB.__shared_io_pool_size=83886080
ORCLCDB.__shared_pool_size=352321536
ORCLCDB.__streams_pool_size=0
*.audit_file_dest='/opt/oracle/ /ORCLCDB/adump'
*.audit_sys_operations=false
*.audit_trail='none'
*.compatible='12.2.0'
*.control_files='/opt/oracle/oradata/ORCLCDB/control01.ctl'
*.db_block_size=8192
*.db_name='ORCLCDB'
*.diagnostic_dest='/opt/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLCDBXDB)'
*.enable_pluggable_database=true
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=512m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1536m
*.undo_C C"