Skip to content

Commit

Permalink
add script idenc_tde_pdbuni.sql to automatically
Browse files Browse the repository at this point in the history
deploy TDE in PDB in unified mode
  • Loading branch information
oehrlis committed Aug 30, 2023
1 parent af8fd09 commit 5057025
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions sql/idenc_tde_pdbuni.sql
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 -------------------------------------------------------------------------

0 comments on commit 5057025

Please sign in to comment.