Column encryption - creating new table that has encrypted column(s)
In this recipe, you're going to learn to use TDE column encryption to encrypt columns in a newly created table.
Getting ready
It is assumed that a keystore is opened and a master key is created.
How to do it...
Connect to the database as a user who has administer key privilege or
SYSKMprivilege (for example,maja):$ sqlplus majaCreate a new table (for example, table
enc_colsin schemahr) that has, for example, the following structure:Column name
Column type
Encrypted
NAMEVARCHAR2(50)No
CREDIT_LIMITNUMBER(10)Yes, AES192
SALARYNUMBER(10)Yes, AES192

Figure 11 - A syntax to create the table hr.enc_cols
Connect to the database as a user who can insert and view data in the table (for example,
hruser):SQL> connect hrInsert several arbitrary values into the table
HR.ENC_COLS.
Figure 12 - Test values
Verify that the user can view unencrypted values in all columns.

Figure 13- Encryption is transparent
Connect...