(記述中)ツール:oracle
導入
docker-compose.yml
Text Only |
---|
| version: '3'
services:
db:
image: container-registry.oracle.com/database/free:23.4.0.0
# container_name: oracle
ports:
- 1521:1521
- 5500:5500
volumes:
- ./oradata:/opt/oracle/oradata
- ./startup:/opt/oracle/scripts/startup
environment:
- ORACLE_PWD=oracle
- ORACLE_PDB=FREEPDB1
|
setup (ここでは簡易的に権限設定している)
Text Only |
---|
| mkdir oradata
mkdir startup
chmod 777 oradata
chmod 777 startup
|
起動(# DATABASE IS READY TO USE! が表示される)
以下実行して初期設定
Text Only |
---|
| docker compose exec db ./setPassword.sh password123
docker compose exec db sqlplus sys/password123@freepdb1 as sysdba
# SQL内で接続情報作成
CREATE USER myuser
IDENTIFIED BY password123
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON users;
GRANT CONNECT, RESOURCE TO myuser;
exit;
|
接続確認
Text Only |
---|
| docker compose exec db sqlplus myuser/password123@freepdb1
|
ベクトル検索
vector_memory_sizeの変更が必要。CDBレベルで設定して再起動する。
Text Only |
---|
| docker compose exec db sqlplus sys/password123@freepdb1 as sysdba
# SQL内で設定更新
show parameter vector_memory_size;
# CDBレベルで更新
alter session set container=CDB$ROOT;
alter system set vector_memory_size = 512M scope=spfile;
shutdown immediate;
# docker再起動してパラメータ更新
docker compose exec db sqlplus sys/password123@freepdb1 as sysdba
show parameter vector_memory_size;
|
参考