This example starts with creating a database protected by a software wallet. If you already have an existing database protected by software wallet you can skip this section.
-
Create a wallet directory located in the
$ORACLE_BASE/admin/db_unique_namedirectory e.g., wallet. -
Log in to the database instance as a user who has been granted the SYSDBA administrative privilege.
|
›_ sqlplus console |
|---|
|
-
Set
WALLET_ROOTparameter.
|
›_ sqlplus console |
|---|
|
-
Shut down and start up database.
|
›_ sqlplus console |
|---|
|
-
Set
TDE_CONFIGURATIONparameter.
|
›_ sqlplus console |
|---|
|
-
Grant the
ADMINISTER KEY MANAGEMENTorSYSKMprivilege toSYSTEMand any user that you want to use.
|
›_ sqlplus console |
|---|
|
-
Connect to the database as system user.
|
›_ sqlplus console |
|---|
|
-
Run the
ADMINISTER KEY MANAGEMENT SQLstatement to create the keystore.
|
›_ sqlplus console |
|---|
|
-
Run the
ADMINISTER KEY MANAGEMENT SQLstatement to open the software based keystore.
|
›_ sqlplus console |
|---|
|
-
Set the master encryption key in the software keystore.
|
›_ sqlplus console |
|---|
|
-
Create a
SCIENTISTStable into the DB.
|
›_ sqlplus console |
|---|
|
-
Enter data into the
SCIENTISTStable.
|
›_ sqlplus console |
|---|
|
-
Verify inserted data into
SCIENTISTStable.
|
›_ sqlplus console |
|---|
|
-
Encrypt the 'Salary' column from
SCIENTISTS.
|
›_ sqlplus console |
|---|
|
-
The Transparent Data Encryption decrypts the encrypted column automatically and returns the data in clear format.
|
›_ sqlplus console |
|---|
|
-
Verify the column is encrypted in your DB.
|
›_ sqlplus console |
|---|
|
-
View the information of software keystore.
|
›_ sqlplus console |
|---|
|
-
Create an encrypted tablespace.
|
›_ sqlplus console |
|---|
|
-
Create EMP table inside the
SECURETStablespace.
|
›_ sqlplus console |
|---|
|
-
Insert data into the
EMPtable.
|
›_ sqlplus console |
|---|
|
-
View the data from
EMPtable.
|
›_ sqlplus console |
|---|
|
-
Close the software keystore.
|
›_ sqlplus console |
|---|
|
-
Now try to view the contents of
EMPtable.
|
›_ sqlplus console |
|---|
|
As the keystore is closed, you will get an error message “ORA-28365: wallet is not open” and hence you cannot view the data from EMP table
-
Open the Keystore.
|
›_ sqlplus console |
|---|
|
-
Now view the data from EMP table.
|
›_ sqlplus console |
|---|
|
-
List all the Key IDs.
|
›_ sqlplus console |
|---|
|