-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script idenc_tde_pdbuni.sql to automatically
deploy TDE in PDB in unified mode
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
-------------------------------------------------------------------------------- | ||
-- OraDBA - Oracle Database Infrastructur and Security, 5630 Muri, Switzerland | ||
-------------------------------------------------------------------------------- | ||
-- Name......: idenc_tde_pdbuni.sql | ||
-- Author....: Stefan Oehrli (oes) [email protected] | ||
-- Editor....: Stefan Oehrli | ||
-- Date......: 2023.08.29 | ||
-- Revision..: | ||
-- Purpose...: Initialize TDE in a PDB in united mode i.e., with a common wallet | ||
-- of the CDB in WALLET_ROOT. The CDB must be configured for | ||
-- TDE beforehand. This scripts does use several other scripts to | ||
-- enable TDE and it also includes restart of the pdb. | ||
-- | ||
-- The following steps are performed: | ||
-- - csenc_master.sql create master encryption key | ||
-- - restart pdb | ||
-- - ssenc_info.sql show current TDE configuration | ||
-- Notes.....: | ||
-- Reference.: Requires SYS, SYSDBA or SYSKM privilege | ||
-- License...: Apache License Version 2.0, January 2004 as shown | ||
-- at http://www.apache.org/licenses/ | ||
-------------------------------------------------------------------------------- | ||
-- format SQLPlus output and behavior | ||
SET LINESIZE 160 PAGESIZE 200 | ||
SET HEADING ON | ||
SET FEEDBACK ON | ||
|
||
-- start to spool | ||
SPOOL idenc_tde_pdbuni.log | ||
|
||
-- uncomment the following line if you have issues with pre-created master | ||
-- encryption keys. e.g., because TDE wallets have been recreated | ||
--@idenc_lostkey.sql | ||
|
||
-- configure master encryption key | ||
@csenc_master.sql | ||
|
||
PROMPT == Restart database to load software keystore with new master key ======= | ||
ALTER PLUGGABLE DATABASE CLOSE; | ||
ALTER PLUGGABLE DATABASE OPEN; | ||
|
||
-- display information | ||
@ssenc_info.sql | ||
|
||
SPOOL OFF | ||
-- EOF ------------------------------------------------------------------------- |