※ 本記事は、Martin Bachによる”Simplified TDE configuration in Oracle Database 23ai Free“を翻訳したものです。
2024年7月4日
Oracleは最近、Database 23aiをリリースし、現在のLong Term SupportとしてDatabase 19cを引き継ぎました。リリースの一部として、Database Free RPM、VMおよびコンテナ・イメージが23.4.0.24.05に更新されました。これは、ラボVMを更新する良い時期かもしれません!
oracle-database-free-23ai RPMのインストール
RPMを使用してVMにデータベース・ソフトウェアをインストールする場合、/etc/sysconfig/oracle-free-23ai.conf に新しいオプションが表示されることに驚くかもしれません:
#This is a configuration file to setup the Oracle Database.
#It is used when running '/etc/init.d/oracle-free-23ai configure'.
# LISTENER PORT used Database listener, Leave empty for automatic port assignment
LISTENER_PORT=1521
# Character set of the database
CHARSET=AL32UTF8
# Database file directory
# If not specified, database files are stored under Oracle base/oradata
DBFILE_DEST=
# DB Domain name
DB_DOMAIN=
# Configure TDE
CONFIGURE_TDE=false
# Encrypt Tablespaces list, Leave empty for user tablespace alone or provide ALL for encrypting all tablespaces
# For specific tablespaces use SYSTEM:true,SYSAUX:false
ENCRYPT_TABLESPACES=
# SKIP Validations, memory, space
SKIP_VALIDATIONS=false
行18: CONFIGURE_TDE – how nice 🙂 そのスイッチをtrueにフリップすると、sudo /etc/init.d/oracle-free-23ai configure の実行後にTDEが有効なデータベースが表示されます。データベース作成の出力を次に示します:
Specify a password to be used for database accounts. Oracle recommends that the password entered
should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character
and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
Enter SYS user password:
*******
Enter SYSTEM user password:
*********
Enter PDBADMIN User Password:
******
Enter password for the TDE wallet:
*******
Prepare for db operation
7% complete
Copying database files
8% complete
29% complete
Creating and starting Oracle instance
30% complete
33% complete
36% complete
39% complete
43% complete
Completing Database Creation
47% complete
49% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/FREE.
Database Information:
Global Database Name:FREE
System Identifier(SID):FREE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.
Connect to Oracle Database using one of the connect strings:
Pluggable database: oracle23aifree/FREEPDB1
Multitenant container database: oracle23aifree
データベースは、Transparent Data Encryptionを有効にして作成されたもので、次のクイック・チェックが示されています:
SQLcl: Release 23.4 Production on Mon May 13 10:28:51 2024
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.4.0.24.05
SQL> select wrl_parameter, status, wallet_type, keystore_mode, con_id from v$encryption_wallet;
WRL_PARAMETER STATUS WALLET_TYPE KEYSTORE_MODE CON_ID
__________________________________________ _________ ______________ ________________ _________
/opt/oracle/admin/FREE/wallet_root/tde/ OPEN AUTOLOGIN NONE 1
OPEN AUTOLOGIN UNITED 2
OPEN AUTOLOGIN UNITED 3
関連する表領域が暗号化されているかどうか疑問に思った場合は、これが質問の答えになるかもしれません:
SQL> SELECT
2 c.name AS pdb_name,
3 t.name AS tbs_name,
4 e.encryptionalg AS alg,
5 e.status
6 FROM
7 v$tablespace t,
8 v$encrypted_tablespaces e,
9 v$containers c
10 WHERE
11 e.ts# = t.ts#
12 AND e.con_id = t.con_id
13 AND e.con_id = c.con_id
14 ORDER BY
15 e.con_id,
16 t.name
17* /
PDB_NAME TBS_NAME ALG STATUS
___________ ___________ _________ _________
CDB$ROOT USERS AES256 NORMAL
FREEPDB1 SYSAUX AES256 NORMAL
FREEPDB1 SYSTEM AES256 NORMAL
FREEPDB1 USERS AES256 NORMAL
暗号化する表領域を微調整することもできます。前述の構成ファイルのENCRYPT_TABLESPACESを参照してください。
まとめ
Oracle Database Free 23.4.0.24.05でのTDEの有効化はこれ以上ないほど簡単です。構成パラメータを変更してデータベースを作成するだけです。このオプションを使用すると、TDE対応データベースを作成する場合に多くの時間を節約できます。TDEをOracle Database 23ai Freeとともに使用することは、データベースのクラウド移行を準備するための優れたステップです。
