Blog

How to Rotate and Rekey TDE on Oracle ExaCS with dbaascli

Written by Chanaka Yapa | Sep 2, 2026, 4:59:19 PM

Introduction

We’re living in an AI-driven world. Almost overnight, AI has spread into every industry – and I mean every one. In my view, it hasn’t replaced workers so much as elevated them: with the right data in front of you, you make better decisions, faster.

Oracle has been making serious strides here. But the part people tend to skip over is that none of this works without stable infrastructure underneath it. That’s where Exadata comes in, and it’s why OCI has gained real ground. The platform scales and delivers the performance an AI-driven workload actually demands.

Security is just as critical. Oracle includes Transparent Data Encryption (TDE) at no extra cost, which is what pulled me into the topic of data-at-rest protection in the first place. But encryption alone isn’t the finish line. If a key is ever exposed, your protection is effectively gone. Rotating the TDE master key (the rekey operation) sits squarely in the DBA’s hands, and it’s a responsibility worth taking seriously.

Now, a word of warning before we go further. ExaCS is a different beast. Oracle built a layer of orchestration tooling to take most of the administration burden off your plate, and on both ExaCS and ExaCC that means one thing: you need to master dbaascli. It’s the entry point for nearly everything you’ll do, and TDE key management is no exception.

 

Rotating and Rekeying TDE on ExaCS

In this blog, I’ll walk you through how to rotate and rekey TDE on ExaCS.

 

Start by Checking the Password

I always check the wallet password before I do anything else. It takes five seconds, and it saves you from finding out mid-operation that the password on your runbook is stale.

mkstore -wrl <wallet_root/tde> -list

 

If it accepts the password, carry on; if it doesn’t, stop and sort that out first. Nothing below works without it.

 

Check the Current TDE Status

Now let’s see how TDE is set up on the database before we change anything.

[root@exadevdb02-node01 ~]# dbaascli tde status --dbname TEST4UAT
DBAAS CLI version 25.2.1.0.0
Executing command tde status --dbname TEST4UAT
Job id: f08ae234-3161-4310-a844-2eeba7d9fb9d
Session log: /var/opt/oracle/log/TEST4UAT/tde/status/dbaastools_2025-08-20_02-58-51-PM_322729.log
[INFO] [DBAAS-80126] The usage of this command is deprecated.
   ACTION: It is recommended to use 'dbaascli database getDetails' for this operation.
TDE is configured on this instance with:
 keystore login: auto
 keystore status: <open>
 keystore type: autologin

Checking wallet consistency.
Master keys compared successfully.
dbaascli execution completed

 

Three things to look at here. The keystore type is autologin, so the wallet opens by itself when the database starts, and you don’t have to babysit it. The status is open, so it’s usable right now. And the last line says the master keys compared successfully, which means the wallet is consistent. If you don’t see that line, don’t go any further until you know why.

You’ll also spot the deprecation warning. The command still works in 25.2.1.0.0, but Oracle wants you on dbaascli database getDetails now. Might as well start using it before the old one goes away.

Logs for this command live here:

/var/opt/oracle/log/<DB-NAME>/tde/status/

 

Save the session log path from the output. If something goes wrong later, that’s the first file you’ll open.

 

Run the Prechecks First

Don’t point the rekey at a cold database. Run it with --executePrereqs first. It walks the same pipeline the real command uses but doesn’t touch a single key, so if there’s a problem you find out on your own terms.

The --rotateMasterKeyOnAllPDBs true flag pulls every PDB into the operation, not just the CDB. In a multitenant environment, that’s almost always what you want. Rotate the CDB alone, and your PDB keys are still sitting there untouched.

[root@exadevdb02-node01 ~]# dbaascli tde rotateMasterKey --dbname TEST4UAT--rotateMasterKeyOnAllPDBs true --executePrereqs
DBAAS CLI version 25.3.1.0.0
Executing command tde rotateMasterKey --dbname TEST4UAT--rotateMasterKeyOnAllPDBs true --executePrereqs
Job id: 378848a5-c5e4-4829-b71f-542829c6afd2
Session log: /var/opt/oracle/log/TEST4UAT/tde/rotateMasterKey/dbaastools_2025-10-17_03-25-59-PM_159312.log
Enter keystore password:
Loading PILOT...
Session ID of the current execution is: 2017
Log file location: /var/opt/oracle/log/TEST4UAT/tde/rotateMasterKey/pilot_2025-10-17_03-26-44-PM_164185
-----------------
Running Plugin_initialization job
Enter keystore password:                                                    **************
Completed Plugin_initialization job
-----------------
Running Perform_dbca_prechecks job
Completed Perform_dbca_prechecks job
-----------------
Running Standby_blob_extraction job
Skipping. Job is detected as not applicable.
-----------------
Running Rotate_tde_master_key job
Skipping. Job is detected as not applicable.
-----------------
Running Generate_blob_file job
Skipping. Job is detected as not applicable.
dbaascli execution completed

 

What You’re Looking At

People see three jobs marked “Skipping” and assume something broke. Nothing broke.

The two jobs that matter are Plugin_initialization and Perform_dbca_prechecks, and both say ‘Completed’. That’s your green light.

The skipped ones are skipped for good reasons. Standby_blob_extraction and Generate_blob_file only do anything when there’s a Data Guard standby involved, and there isn’t one here. Rotate_tde_master_key is the actual rotation, and it’s skipped because you asked for prechecks only. That’s the flag doing exactly what you told it to do.

 

Run the Rotation

Prereqs passed, so now we do it for real. Same command, same flags – just drop --executePrereqs. That single omission is the difference between a dry run and a live key rotation, so read your command line twice before you hit Enter.

[root@exadevdb02-node01 ~]# dbaascli tde rotateMasterKey --dbname TEST4UAT--rotateMasterKeyOnAllPDBs true
DBAAS CLI version 25.3.1.0.0
Executing command tde rotateMasterKey --dbname TEST4UAT --rotateMasterKeyOnAllPDBs true
Job id: f3c0b72c-1962-4fbd-9ea8-54ca6778c089
Session log: /var/opt/oracle/log/TEST4UAT/tde/rotateMasterKey/dbaastools_2025-10-17_03-29-13-PM_188866.log
Enter keystore password:
Loading PILOT...
Session ID of the current execution is: 2018
Log file location: /var/opt/oracle/log/TEST4UAT/tde/rotateMasterKey/pilot_2025-10-17_03-29-42-PM_192520
-----------------
Running Plugin_initialization job
Enter keystore password:                                                    *************
Completed Plugin_initialization job
-----------------
Running Perform_dbca_prechecks job
Completed Perform_dbca_prechecks job
-----------------
Running Standby_blob_extraction job
Skipping. Job is detected as not applicable.
-----------------
Running Rotate_tde_master_key job
Completed Rotate_tde_master_key job
-----------------
Running Generate_blob_file job
Skipping. Job is detected as not applicable.
dbaascli execution completed

 

Put the Two Outputs Side by Side, and There’s Exactly One Difference That Matters:

Running Rotate_tde_master_key job
Completed Rotate_tde_master_key job

 

That’s the rekey. New master key generated and activated across the CDB and every PDB.

Everything else looks the same. The prechecks run again rather than trusting the earlier pass, which is the behavior you want. The standby jobs skip again for the same reason.

 

Validate the Rekey

dbaascli saying “Completed” is good, but it isn’t evidence. Go into the database and look at the keys yourself. V$ENCRYPTION_KEYS shows you every master key in the wallet with the date each one was created.

SQL> set lines 600
col CREATION_TIME for a40
col TAG for a30
select key_id,tag,keystore_type,creation_time from v$encryption_keys;SQL> SQL> SQL>

 

You’re looking for a new row with a creation time that matches when you ran the rekey. In my case, that was a fresh entry dated 17 October sitting next to the previous key. Two rows, not one, which is the same point I made above about old keys being kept rather than replaced.

 

Changing the Keystore Password

The master key is one control. The password protecting the keystore is a different one, and both should be on your yearly list. If the wallet password leaks, a new master key doesn’t save you.

The command is dbaascli tde changePassword. Same as before, run the prechecks first.

[root@exadevdb02-node01 ~]# dbaascli tde changepassword --dbname TEST4UAT--executePrereqs
DBAAS CLI version 25.3.1.0.0
Executing command tde changepassword --dbname TEST4UAT--executePrereqs
Job id: 29ea5a52-a237-40f4-a686-18ac68039a96
Session log: /var/opt/oracle/log/TEST4UAT/tde/changePassword/dbaastools_2025-10-17_04-05-18-PM_69891.log
Enter Old keystore password:
Enter New keystore password:
Enter New keystore password (reconfirmation):
Loading PILOT...
Enter Old keystore password                                                 *************
Enter Old keystore password (reconfirmation):                               ************
Enter New keystore password                                                 *********
Enter New keystore password (reconfirmation):                               *********
Session ID of the current execution is: 2021
Log file location: /var/opt/oracle/log/TEST4UAT/tde/changePassword/pilot_2025-10-17_04-05-57-PM_73517
-----------------
Running Plugin_initialization job
Completed Plugin_initialization job
-----------------
Running TDE_change_password_prechecks job
Execution of TDE_change_password_prechecks failed
[FATAL] [DBAAS-60197] Invalid password.
   CAUSE: 'Password can only contain letters, numbers or the following special characters: - _ # ! ^ * ( ) [ ] { } : + < > ,'.
   ACTION: Ensure the password matches the following verification criteria:
                1) Password must have a length greater than or equal to 6 characters
                2) Password must have a length less than or equal to 30 characters
                3) Password can only contain letters, numbers or the following special characters:  - _ # ! ^ * ( ) [ ] { } : + < > ,  .
*** Executing jobs which need to be run always... ***
******** PLUGIN EXECUTION FAILED ********
To resume this failed session, run the following command:
dbaascli tde changePassword --dbname TEST4UAT --executePrereqs true --sessionID 2021 --resume

 

I’m Leaving the Failure in

I could have shown you a clean run, but this is the most common way this command bites people, and it makes the case for --executePrereqs better than anything I could write.

DBAAS-60197 means my new password had a character dbaascli won’t take. The rules are narrow. Six to thirty characters, letters and numbers, and only these specials:

- _ # ! ^ * ( ) [ ] { } : + < > ,

 

This is the clean run of the proper password.

[root@exadevdb02-node01 ~]# dbaascli tde changepassword --dbname TEST4UAT --executePrereqs
DBAAS CLI version 25.3.1.0.0
Executing command tde changepassword --dbname TEST4UAT --executePrereqs
Job id: 40e153c9-c15f-4d8b-b02a-9cbf083ff151
Session log: /var/opt/oracle/log/TEST4UAT/tde/changePassword/dbaastools_2025-10-17_04-08-33-PM_101032.log
Enter Old keystore password:

Enter New keystore password:                                                                       ***********
Session ID of the current execution is: 2022
Log file location: /var/opt/oracle/log/TEST4UAT/tde/changePassword/pilot_2025-10-17_04-10-00-PM_115366
-----------------
Running Plugin_initialization job
Completed Plugin_initialization job
-----------------
Running TDE_change_password_prechecks job
Completed TDE_change_password_prechecks job
-----------------
Running Extract_blob_in_standby job
Skipping. Job is detected as not applicable.
-----------------
Running Copy_blob_contents_in_standby job
Skipping. Job is detected as not applicable.
-----------------
Running TDE_change_password job
Skipping. Job is detected as not applicable.
-----------------
Running Update_db_wallet job
Skipping. Job is detected as not applicable.
-----------------
Running Prepare_blob_for_standby_in_primary job
Skipping. Job is detected as not applicable.

dbaascli execution completed
[root@exadevdb02-node01 ~]#

 

Run it For Real

Prechecks are clean, so run the same command without --executePrereqs.

dbaascli tde changepassword --dbname TEST4UAT

 

Same prompting as before, same double password entry. The difference is that this time the new password actually gets written to the wallet.

Then go straight back and check it:

mkstore -wrl <wallet_root/tde> -list

 

Same command I opened this post with. Use the new password. If it lists the wallet contents, you’re done, and the change stuck. Do this immediately, while you still have the terminal open and the password fresh in your head. Finding out three weeks later that the change didn’t take is a bad afternoon.

 

Change the SYS Password Too

While you’re in there, change the SYS password as well. My view is these two belong together in the same maintenance window. You’re already down in the credentials; you’ve already got the change approved, and doing them separately means doing the paperwork twice.

Run the prechecks first, same as everything else:

dbaascli database changepassword --dbname TEST4UAT --executePrereqs

 

Then run it again without the flag once it passes.

And here’s the part I want to be direct about: do this through dbaascli, not with ALTER USER. It’s tempting to think a SYS password change is simple enough to do in SQL*Plus. On ExaCS it isn’t. The orchestration layer keeps its own record of these credentials, and if you change the password underneath it in SQL, the tooling still thinks the old one is current. Everything looks fine until the next automated operation goes to authenticate and fails, and by then you’ve forgotten you did it.

 

Wrapping Up

None of this is difficult. That’s really the point. Between dbaascli tde rotateMasterKey, dbaascli tde changePassword and dbaascli database changePassword, you can rotate your master key, your wallet password and your SYS password in a single maintenance window – online, no outage, and with a session log for every step when the auditor comes asking.

The hard part isn’t the commands. It’s remembering to run them. TDE gets set up once on day one, works quietly forever, and quietly stops being a control the moment a key or password goes stale. Encryption you never rotate is encryption you’re trusting on faith.

So put it in the calendar. Once a year, minimum. Run your prechecks, keep the logs, and validate afterwards rather than assuming it worked.

For more information, check out our Oracle Cloud Infrastructure Services, or contact us today, and one of our experts will be in touch.