To rekey an existing tablespace that is online, use the REKEY clause of the ALTER TABLESPACE SQL statement.
-
Log in to the DB instance as a system user.
SQL
SQL> connect system/<password>;
-
List the encrypted tablespace.
SQL
SQL> select TABLESPACE_NAME, ENCRYPTED from DBA_TABLESPACES;
-
Open a Keystore.
SQL
SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY <hsm_password>;
-
Rekey the existing tablespace SECURE_TS.
SQL
SQL> alter tablespace SECURE_TS ENCRYPTION USING 'AES192' REKEY FILE_NAME_CONVERT = ('SECURETS_01.DBF','SECURETS_03.DBF');
-
Check if the rekeying was successful..
SQL
SQL> select * from V$ENCRYPTED_TABLESPACES;