With the increased risk of a cyberattacks, the protection of one of your most valuable asset’s, your data, is vital. Data within the Oracle database is generally the most vital and/or sensitive data within the company. The best way to start protecting that data is with Transparent Data Encryption (TDE).
Some of the benefits of using TDE are:
- Helps address security and compliance needs
- There is no need to change the applications that are accessing the database
- Users and applications are not aware the data is encrypted
- There is little downtime involved
- Your data is safe, even if the media is stolen
TDE encrypts sensitive data stored in data files. To prevent unauthorized decryption, TDE stores the encryption keys in a keystore.
Secure PDB Using Transparent Database Encryption (TDE)
Introduction
In this blog we will focus on how to encrypt the database when working with Pluggable databases (PDB) , containers (CDB) and wallets as the keystore.
Technical details
For this blog, we have the following setting:
Questions about your own setup? A dbi services consultant can look at your case.
Talk to an expert (opens in a new tab)- OS : Oracle Linux 9.7
- Oracle Database 26ai
- Oracle Container Database : CDB26
- Oracle Pluggable Database : PDB26
Task 1: Validate the starting state
We start off with an unencrypted database and will be validating that state in this session.
Run the sql :
set linesize 170;
column wrl_parameter format a50
column wrl_type heading 'Type' format a10
column status heading 'Status' format a30
column fully_backed_up heading 'Backed Up' format a10
column pdb_name heading 'PDB Name' format a10
select b.name pdb_name,wrl_type,
wrl_parameter,
status,wallet_type,
keystore_mode,
fully_backed_up
from v$encryption_wallet a,v$containers b
where a.con_id = b.con_id(+);
exit;
Columns description
WRL_PARAMETER ---> Location of the wallet file
Status ---> Wallet status
NOT_AVAILABLE --> No wallet created yet
OPEN_NO_MASTER_KEY --> keystore has been been created and is open, but no master key set
OPEN --> Wallet open, and master key set
The output should be :
PDB Name Type WRL_PARAMETER Status WALLET_TYPE KEYSTORE Backed Up
---------- ---------- -------------------------------------------------- ------------------------------ -------------------- -------- ----------
CDB$ROOT FILE /u01/app/oracle/admin/CDB26/wallet NOT_AVAILABLE UNKNOWN NONE UNDEFINED
PDB$SEED FILE NOT_AVAILABLE UNKNOWN UNITED UNDEFINED
PDB26 FILE NOT_AVAILABLE UNKNOWN UNITED UNDEFINED
You can see the default location of the wallet file. There is no wallet yet. At this point CDB26 does not know about a wallet or encryption
Look about encryption keys :
set feedback off
set linesize 150
set pagesize 50
set heading on
column pdb_name heading "PDB Name" format a15
column tablespace_name heading "Tablespace Name" format a30
column masterkeyid_base64 heading "Master Key ID" format a60
column encrypted heading "Encrypted" format a10
column status heading "Status" format a10
column encryptionalg heading "Encryption Alg" format a15
break on pdb_name skip 1
select pdb_name,
tablespace_name,encrypted,
utl_raw.cast_to_varchar2( utl_encode.base64_encode('01'||substr(mkeyid,1,4)))
|| utl_raw.cast_to_varchar2( utl_encode.base64_encode(substr(mkeyid,5,length(mkeyid)))) masterkeyid_base64,
status,
encryptionalg
FROM (select t.name tablespace_name,
z.name pdb_name,
t.con_id, encrypted,
RAWTOHEX(x.mkid) mkeyid ,
r.status status,
r.encryptionalg encryptionalg
from v$tablespace t,
x$kcbtek x,
v$containers z,
cdb_tablespaces q,
v$encrypted_tablespaces r
where t.ts#=x.ts#
and t.con_id=x.con_id
and t.con_id=z.con_id
and t.con_id = q.con_id
and t.con_id = r.con_id(+)
and t.ts# = r.ts#(+)
and t.name = q.tablespace_name)
order by pdb_name,tablespace_name;
exit;
The output should be :
PDB Name Tablespace Name Encrypted Master Key ID Status Encryption Alg
--------------- ------------------------------ ---------- ------------------------------------------------------------ ---------- ---------------
CDB$ROOT SYSAUX NO ATThZEiYWUwngfMcKC8YYZI=
SYSTEM NO ATThZEiYWUwngfMcKC8YYZI=
TEMP NO ATThZEiYWUwngfMcKC8YYZI=
UNDOTBS1 NO ATThZEiYWUwngfMcKC8YYZI=
USERS NO AQAAAAAAAAAAAAAAAAAAAAA=
PDB26 SYSAUX NO AWun6yDayU+kn1iwkckN4DE=
SYSTEM NO AWun6yDayU+kn1iwkckN4DE=
TEMP NO AWun6yDayU+kn1iwkckN4DE=
UNDOTBS1 NO AWun6yDayU+kn1iwkckN4DE=
USERS NO AQAAAAAAAAAAAAAAAAAAAAA=
Shows tablespaces associated with the database whether they are encrypted or not. If they are encrypted, the output show what is the master key use for encryption.
So actually, nothing is configured for Transparent Data Encryption in the CDB CDB26
Task 2: Backup
This backup operation takes about 5 minutes to complete, is optional, and may be skipped. The main reason for performing this task is simply so that you can re-run this lab multiple times if you so choose, or restart midway if you make a mistake.
rman target /
RMAN> backup database plus archivelog delete input tag 'BEFORETDE';
Task 3: Create A Wallet
In this section we will create a wallet for the CDB CDB26.
First, we create the wallet directory:
mkdir -p /u01/app/oracle/wallets/CDB26/tde
We need to perform the following:
- Changes the wallet root parameter. Recommendation for 19c and above is to use the spfile parameter
WALLET_ROOT - Bounce the database
- Tells to the database to use a keystore file
- Create it and open it
- Create an autologin wallet (optional)
set verify off
prompt
prompt
prompt #####################################################################################
prompt #### set the WALLET_ROOT in the database to /u01/app/oracle/wallets/CDB26/wallet ####
prompt #####################################################################################
alter system set WALLET_ROOT='/u01/app/oracle/wallets/CDB26' scope=spfile;
prompt
prompt ##############################################################################
prompt #### bounce the database - WALLET_ROOT changes require a DB bounce ####
prompt ##############################################################################
startup force;
prompt ##############################################################################
prompt #### set tde_configuration to use a file (vs OKV) ####
prompt ##############################################################################
alter system set tde_configuration='KEYSTORE_CONFIGURATION=FILE' scope=both;
prompt
prompt ##########################################################################
prompt #### Create the united Keystore and open the keystore for the CDB ######
prompt ##########################################################################
prompt
ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/u01/app/oracle/wallets/CDB26/tde' IDENTIFIED BY "Oracle4TDE!";
ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "Oracle4TDE!";
prompt
prompt ###################################################
prompt #### Open the Keystore for PDB26 ###############
prompt ###################################################
prompt
prompt
alter session set container=PDB26;
ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "Oracle4TDE!";
alter session set container=CDB$ROOT;
prompt
prompt ##########################################################################
prompt #### Convert the united keystore to autologin ##########################
prompt ##########################################################################
prompt
ADMINISTER KEY MANAGEMENT CREATE AUTO_LOGIN KEYSTORE FROM KEYSTORE '/u01/app/oracle/wallets/CDB26/tde' IDENTIFIED BY "Oracle4TDE!";
The output should be like:
SQL> prompt alter system set WALLET='/u01/app/oracle/wallets/CDB26' scope=spfile;
alter system set WALLET='/u01/app/oracle/wallets/CDB26' scope=spfile
SQL> prompt
SQL> alter system set WALLET_ROOT='/u01/app/oracle/wallets/CDB26' scope=spfile;
System altered.
SQL> startup force;
ORACLE instance started.
Total System Global Area 1607700512 bytes
Fixed Size 5009440 bytes
Variable Size 503316480 bytes
Database Buffers 1090519040 bytes
Redo Buffers 8855552 bytes
Database mounted.
Database opened.
SQL>
SQL> ##############################################################################
SQL> #### set tde_configuration to use a file (vs OKV) ####
SQL> ##############################################################################
SQL>
SQL> alter system set tde_configuration='KEYSTORE_CONFIGURATION=FILE' scope=both
SQL>
SQL>
System altered.
SQL>
SQL> ##########################################################################
SQL> #### Create the united Keystore and open the keystore for the CDB ######
SQL> ##########################################################################
SQL>
SQL> ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/u01/app/oracle/wallets/CDB26/tde' IDENTIFIED BY "Oracle4TDE!"
SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "Oracle4TDE!"
SQL>
SQL>
keystore altered.
SQL>
keystore altered.
SQL>
SQL>
SQL> ###################################################
SQL> #### Open the Keystore for PDB26 ###############
SQL> ###################################################
SQL>
SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "Oracle4TDE!"
SQL> alter session set container=PDB26
SQL>
SQL>
Session altered.
SQL>
keystore altered.
SQL>
Session altered.
SQL> ##########################################################################
SQL> #### Convert the united keystore to autologin ##########################
SQL> ##########################################################################
SQL>
SQL> ADMINISTER KEY MANAGEMENT CREATE AUTO_LOGIN KEYSTORE FROM KEYSTORE '/u01/app/oracle/wallets/CDB26/tde' IDENTIFIED BY "Oracle4TDE!"
keystore altered.
Keep the following in mind:
- Changing the spfile parameter requires a database bounce.
- Set the wallet root location when you have a maintenance window and set the key.
- This allows you to go down the encryption path later.
- They don’t have to be done together.
- Plan for a bounce before you start the encryption process.
- After the database comes back up from the bounce the following tasks are performed by the script:
- Set tde configuration parameter. In this case it is set to file (other choice is Oracle Key Vault aka OKV). What we are telling the database is : in wallet root location, under the tde directory, I’m going to be using a wallet file
For the keystore the following tasks are performed in this step:
- Give it a wallet file
- Give it a password
- Open it
- Changing to PDB26
- Using a autologin wallet
Note the 2 files in the directory
- .p12 is the password file
- Cannot access the file without the password
- Need to back this up when you backup the database
- It should not be with the database directories Use to add keys and make changes to the wallet
- .sso is the auto login wallet
- You do not want to backup this file
- Anybody who has this will be able open the database and read the keys
Even if somebody got the database without the wallets, they can’t get the key that is protecting that database.
Notes:
We decide to using a unified wallet (default feature). This means the wallet that is used for the CDB contains the keys for the CDB and the PDBs. When you have Multi-Tenant the CDB and the PDB‘s all have independent keys. In this case :
- The CDB has it’s own Master Encryption Key
- The PDB has it’s own Master Encryption Key If there were a second PDB it would also have it’s own unique Master Encryption Key
The script also creates a second wallet, the autologin wallet. No password needed to read it. Database able to connect to it at startup. When restarted, it will auto read the wallet and pull any keys that are set in that wallet to do the encryption.
If you do not create an autologin wallet when you start the database, you need to manually open up the wallet using the password in order to access the keys.
Not as secure a method, but less effort when you bounce the database. Most customers use an auto login wallet, especially with RAC.
Check the wallet status:
set linesize 170;
column wrl_parameter format a50
column wrl_type heading 'Type' format a10
column status heading 'Status' format a30
column fully_backed_up heading 'Backed Up' format a10
column pdb_name heading 'PDB Name' format a10
select b.name pdb_name,wrl_type,
wrl_parameter,
status,wallet_type,
keystore_mode,
fully_backed_up
from v$encryption_wallet a,v$containers b
where a.con_id = b.con_id(+);
exit;
The output should be:
PDB Name Type WRL_PARAMETER Status WALLET_TYPE KEYSTORE Backed Up
---------- ---------- -------------------------------------------------- ------------------------------ -------------------- -------- ----------
CDB$ROOT FILE /u01/app/oracle/wallets/CDB26/tde/ OPEN_NO_MASTER_KEY PASSWORD NONE UNDEFINED
PDB$SEED FILE CLOSED UNKNOWN UNITED UNDEFINED
PDB26 FILE OPEN_NO_MASTER_KEY PASSWORD UNITED UNDEFINED
The last time we ran this status check the value was NOT AVAILABLE. It has now evolved to OPEN_NO_MASTER_KEY since we are yet to set the key. As a result, while CDB26 and PDB26 both have the wallet open, there is no master key.
Task 4: Set The master Key
We will set the encryption key for the CDB and PDB, and will rely on the tag feature.
Tags are important to identify keys, especially when using OKV where keys are stored in a centralized vault and managed for multiple databases. In such instances, the tag allows to uniquely identify the encryption key.
Notes:
This is the point of no return: once you create a key for the database you can’t rollback it (without RMAN restore).
From this point forward, the database expects the wallet and encryption key to be there when the database starts up. The database knows there is a wallet and master encryption key associated with it.
If you don’t have the database access the wallet, you will get messages that it can’t access the key.
Be sure of the steps before you do this to a database that you use normally.
Each PDB also has its own unique key.
Now we can set encryption key for the CDB and PDBs:
set verify off
prompt
prompt
prompt ##############################################################################
prompt #### set the encryption key for the CDB ####
prompt ##############################################################################
prompt
ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY "Oracle4TDE!" with backup USING 'CDB26: MASTERKEY_FIRST';
prompt
prompt
prompt ##############################################################################
prompt #### set the encryption key for the PDB ####
prompt ##############################################################################
prompt
alter session set container=PDB26;
ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY "Oracle4TDE!" with backup USING 'PDB26: MASTERKEY_FIRST';
exit;
The output should be:
SQL> ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY "Oracle4TDE!" with backup USING 'CDB26: MASTERKEY_FIRST';
keystore altered.
SQL> alter session set container=PDB26;
Session altered.
SQL> ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY "Oracle4TDE!" with backup USING 'PDB26: MASTERKEY_FIRST';
keystore altered.
We use the keyword FORCE because we use an autologin wallet. If we don’t use it we throw an error : ORA-46658: keystore not open in the container.
Check the new status of our wallets :
set linesize 170;
column wrl_parameter format a50
column wrl_type heading 'Type' format a10
column status heading 'Status' format a30
column fully_backed_up heading 'Backed Up' format a10
column pdb_name heading 'PDB Name' format a10
select b.name pdb_name,wrl_type,
wrl_parameter,
status,wallet_type,
keystore_mode,
fully_backed_up
from v$encryption_wallet a,v$containers b
where a.con_id = b.con_id(+);
exit;
The output should be:
PDB Name Type WRL_PARAMETER Status WALLET_TYPE KEYSTORE Backed Up
---------- ---------- -------------------------------------------------- ------------------------------ -------------------- -------- ----------
CDB$ROOT FILE /u01/app/oracle/wallets/CDB26/tde/ OPEN AUTOLOGIN NONE NO
PDB$SEED FILE OPEN AUTOLOGIN UNITED NO
PDB26 FILE OPEN AUTOLOGIN UNITED NO
We can see that the status come to OPEN for all container.
Check now the status of tablespaces and keys:
set feedback off
set linesize 150
set pagesize 50
set heading on
column pdb_name heading "PDB Name" format a15
column tablespace_name heading "Tablespace Name" format a30
column masterkeyid_base64 heading "Master Key ID" format a60
column encrypted heading "Encrypted" format a10
column status heading "Status" format a10
column encryptionalg heading "Encryption Alg" format a15
break on pdb_name skip 1
select pdb_name,
tablespace_name,encrypted,
utl_raw.cast_to_varchar2( utl_encode.base64_encode('01'||substr(mkeyid,1,4)))
|| utl_raw.cast_to_varchar2( utl_encode.base64_encode(substr(mkeyid,5,length(mkeyid)))) masterkeyid_base64,
status,
encryptionalg
FROM (select t.name tablespace_name,
z.name pdb_name,
t.con_id, encrypted,
RAWTOHEX(x.mkid) mkeyid ,
r.status status,
r.encryptionalg encryptionalg
from v$tablespace t,
x$kcbtek x,
v$containers z,
cdb_tablespaces q,
v$encrypted_tablespaces r
where t.ts#=x.ts#
and t.con_id=x.con_id
and t.con_id=z.con_id
and t.con_id = q.con_id
and t.con_id = r.con_id(+)
and t.ts# = r.ts#(+)
and t.name = q.tablespace_name)
order by pdb_name,tablespace_name;
The output should be:
PDB Name Tablespace Name Encrypted Master Key ID Status Encryption Alg
--------------- ------------------------------ ---------- ------------------------------------------------------------ ---------- ---------------
CDB$ROOT SYSAUX NO AR/omWDjKUCwvLr9YksXp5A=
SYSTEM NO AR/omWDjKUCwvLr9YksXp5A=
TEMP NO AR/omWDjKUCwvLr9YksXp5A=
UNDOTBS1 NO AR/omWDjKUCwvLr9YksXp5A=
USERS NO AQAAAAAAAAAAAAAAAAAAAAA=
PDB26 SYSAUX NO AZWgNOvpkktOoa8PVYU0iIg=
SYSTEM NO AZWgNOvpkktOoa8PVYU0iIg=
TEMP NO AZWgNOvpkktOoa8PVYU0iIg=
UNDOTBS1 NO AZWgNOvpkktOoa8PVYU0iIg=
USERS NO AQAAAAAAAAAAAAAAAAAAAAA=
No tablespaces are encrypt yet.
And for the keys?
set linesize 170;
column activation_time heading 'Activation Time' format a22
column pdb_name heading 'PDB Name' format a15
column key_id heading 'Key ID' format a60
select b.name pdb_name,
to_char(a.activation_time,'dd-mon-yyyy hh:mi:ssam') activation_time,
a.key_id
from v$encryption_keys a,v$containers b
where a.con_id = b.con_id(+);
The output should be:
PDB Name Activation Time Key ID
--------------- ---------------------- ------------------------------------------------------------
CDB$ROOT 10-nov-2026 03:04:08pm AR/omWDjKUCwvLr9YksXp5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
PDB26 10-nov-2026 03:05:47pm AZWgNOvpkktOoa8PVYU0iIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
You can see the Key ID relation between the two queries.
The master key id AQAAAAAAAAA is the default master key for user created tablespaces.
We are ready to encrypt the database!
Task 5: Encrypt The Tablespaces
In this section we will encrypt tablespaces. However before proceeding we need to set an encryption algorithm on the CDB.
By default the algorithm is :
- AES128 for Oracle Database 19c
- AES256 for Oracle Database 26ai
It is more secure to use AES256 by default, even in 19c. For this, you can set the hidden parameter "_TABLESPACE_ENCRYPTION_DEFAULT_ALGORITHM" like this:
alter system set "_TABLESPACE_ENCRYPTION_DEFAULT_ALGORITHM"='AES256' scope=both;
In Oracle 26ai this parameter is unhidden.
Execute the following settings:
set verify off
prompt
prompt
prompt ##############################################################################
prompt #### set the default encryption algorithm to AES256 ####
prompt #### set the default to always encrypt new tablespaces ####
prompt ##############################################################################
prompt
alter system set "tablespace_encryption_default_algorithm" = 'AES256' scope = both;
alter system set encrypt_new_tablespaces = always scope = both;
prompt
exit;
The output should be:
##############################################################################
#### set the default encryption algorithm to AES256 ####
#### set the default to always encrypt new tablespaces ####
##############################################################################
alter system set "tablespace_encryption_default_algorithm"='AES256' scope=both;
System altered.
alter system set encrypt_new_tablespaces=always scope=both;
System altered.
With this setup, any new tablespaces will be encrypted with AES256.
We are now ready to encrypt
This is an on-line encryption and will perform the following:
- Sequentially going through all the data files associated with the tablespace and creating a new encrypted copy.
- Keeping track of any changes to each data file during the process and applying them after the encryption is completed
- Under the covers it replaces the current data file with the new data file while the database is up and running
- When finished the space is reclaimed
alter tablespace USERS ENCRYPTION ONLINE USING 'AES256' ENCRYPT;
alter tablespace SYSAUX ENCRYPTION ONLINE USING 'AES256' ENCRYPT;
alter tablespace SYSTEM ENCRYPTION ONLINE USING 'AES128' ENCRYPT;
alter tablespace SYSTEM ENCRYPTION USING 'AES256' rekey;
alter session set container=PDB26;
alter tablespace SYSAUX ENCRYPTION ONLINE USING 'AES256' ENCRYPT;
alter tablespace USERS ENCRYPTION ONLINE USING 'AES256' ENCRYPT;
alter tablespace SYSTEM ENCRYPTION ONLINE USING 'AES128' ENCRYPT;
alter tablespace SYSTEM ENCRYPTION USING 'AES256' rekey;
It will take some times…
In this example, you can see that we encrypt SYSTEM tablespace with AES128 algorithm, and rekey it with AES256.
Notes:
- You need to have enough additional space for the largest data file that is going to be encrypted because a second file will be created
- This can be done in parallel, but more data files are created in parallel so keep your free space in mind
- This can be at a later point in time
- You don’t have to do all the tablespaces at once
- When you are finished you need to do a full backup as an incremental will not see the tablespace as encrypted
- The backup should be done as-soon-as it is done encrypting
- If you do a restore to the data file before doing the full backup and applied the archive logs to bring it forward the restore would be unencrypted
Looking for the tablespace status;
set feedback off
set linesize 150
set pagesize 50
set heading on
column pdb_name heading "PDB Name" format a15
column tablespace_name heading "Tablespace Name" format a30
column masterkeyid_base64 heading "Master Key ID" format a60
column encrypted heading "Encrypted" format a10
column status heading "Status" format a10
column encryptionalg heading "Encryption Alg" format a15
break on pdb_name skip 1
select pdb_name,
tablespace_name,encrypted,
utl_raw.cast_to_varchar2( utl_encode.base64_encode('01'||substr(mkeyid,1,4)))
|| utl_raw.cast_to_varchar2( utl_encode.base64_encode(substr(mkeyid,5,length(mkeyid)))) masterkeyid_base64,
status,
encryptionalg
FROM (select t.name tablespace_name,
z.name pdb_name,
t.con_id, encrypted,
RAWTOHEX(x.mkid) mkeyid ,
r.status status,
r.encryptionalg encryptionalg
from v$tablespace t,
x$kcbtek x,
v$containers z,
cdb_tablespaces q,
v$encrypted_tablespaces r
where t.ts#=x.ts#
and t.con_id=x.con_id
and t.con_id=z.con_id
and t.con_id = q.con_id
and t.con_id = r.con_id(+)
and t.ts# = r.ts#(+)
and t.name = q.tablespace_name)
order by pdb_name,tablespace_name;
select b.name pdb_name,
to_char(a.activation_time,'dd-mon-yyyy hh:mi:ssam') activation_time,
a.key_id
from v$encryption_keys a,v$containers b
where a.con_id = b.con_id(+);
The output should be:
PDB Name Tablespace Name Encrypted Master Key ID Status Encryption Alg
--------------- ------------------------------ ---------- ------------------------------------------------------------ ---------- ---------------
CDB$ROOT SYSAUX YES AR/omWDjKUCwvLr9YksXp5A= NORMAL AES256
SYSTEM YES AR/omWDjKUCwvLr9YksXp5A= NORMAL AES256
TEMP NO AR/omWDjKUCwvLr9YksXp5A=
UNDOTBS1 NO AR/omWDjKUCwvLr9YksXp5A=
USERS YES AR/omWDjKUCwvLr9YksXp5A= NORMAL AES256
PDB26 SYSAUX YES AZWgNOvpkktOoa8PVYU0iIg= NORMAL AES256
SYSTEM YES AZWgNOvpkktOoa8PVYU0iIg= NORMAL AES256
TEMP NO AZWgNOvpkktOoa8PVYU0iIg=
UNDOTBS1 NO AZWgNOvpkktOoa8PVYU0iIg=
USERS YES AZWgNOvpkktOoa8PVYU0iIg= NORMAL AES256
PDB Name Activation Time Key ID
--------------- ---------------------- ------------------------------------------------------------
CDB$ROOT 10-nov-2026 03:04:08pm AR/omWDjKUCwvLr9YksXp5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
PDB26 10-nov-2026 03:05:47pm AZWgNOvpkktOoa8PVYU0iIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Note:
- You can see the Master Encryption Key is set for SYSAUX and SYSTEM
- It now shows as encrypted
- It shows as encrypted with AES256
- The keys starts with AR/om, which matches the key for the CDB
- If you look at the PDB the Master Encryption Key begins with AZWgN0 and it matches the Key Id at the bottom
- NOTICE: TEMP and UNDO were not encrypted
- No reason to encrypt temp again because anything that gets encrypted will stay encrypted
- The same thing happens with UNDO as it would inherit the starting point of encrypted data, so there is no reason to encrypt this as well
Key Takeaways
- Protecting your data with Transparent Data Encryption (TDE) is essential to secure sensitive information in Oracle databases.
- TDE does not require application changes, keeps data encrypted from users, and operates with minimal downtime.
- The article guides you through tasks such as creating a wallet, setting a master key, and encrypting tablespaces.
- It highlights the importance of managing encryption keys properly, especially when moving Pluggable Databases (PDBs).
- Finally, it stresses that encrypting tablespaces ensures any data processed will remain secure throughout operations.