Short summary on Oracle Transparent Data Encryption


Transparent Data Encyption features:

  • Encrypts columns or entire application data table spaces.
  • Protects the database files on disk and on backup of databases.
  • Transparent to application no changes required.

 

Below action plans are in brief:

  • Perform cold backup
  • Check the table space size.
  • Apply patch 23315889 ( one of patch)
  • $ mkdir -p /APPSOL/appsol/admin/TDE/APPSOL
  • SQL> select * from v$encryption_wallet;
  • update sqlnet.ora file.
ENCRYPTION_WALLET_LOCATION=
 (SOURCE= (METHOD = FILE)
      (METHOD_DATA=
         (DIRECTORY=/APPSOL/appsol/admin/TDE/APPSOL)
      )
 SQL> alter system set encryption key identified by "*******";
  $ ls /APPSOL/appsol/admin/TDE/APPSOL
   Restart DB in mount stage.
   SQL> select TABLESPACE_NAME,ENCRYPTED,COMPRESS_FOR from   DBA_TABLESPACES not in ('SYSTEM','SYSAUX','TEMP','UNDOTBS1');
  Restart DB.
 SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "*******";
 SQL>@tablespace_offline.sql

Create a script called tbsp_offline.sql script to bring table spaces other than system,sysaux,temp and undo offline;

$ sqlplus "/as sysdba"
SQL> spool tbsp_offline.sql
SQL> select 'alter tablespace ' ||tablespace_name||  ' offline;' from dab_tablespaces where tablespace_name not in ('SYSTEM','SYSAUX','TEMP','UNDOTBS1');
SQL> exit
  alter tablespace USERS offline;
  alter tablespace APPSOLD offline;
  alter tablespace APPSOLX offline;
  alter tablespace APPSOLTMPD offline;

Encrypt the database as below:

SQL> @tablespace_encrypt;
encrypt datafile.
 $ sqlplus / as sysdba
SQL> set heading off
SQL> set linesize 150
SQL> set datafile_encrypt.sql
SQL> select 'alter database datafile ' ' ' || file_name || ' ' ' encrypt;' from dab_data_files where tablespace_name not in ('SYSTEM','SYSAUX','TEMP','UNDOTBS1','TOOLS');
SQL> exit;
Now edit the datafile_encrypt.sql script to remove all lines other than alter database commands.
alter database datafile '/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/users01.dbf' encrypt;
alter database datafile '/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsol1.dbf' encrypt;
alter database datafile '/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsoltmp01.dbf' encrypt;
alter database datafile '/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsolx01.dbf' encrypt;
alter database datafile '/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsol02.dbf' encrypt;
alter database datafile
'/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsol03.dbf' encrypt;
alter database datafile '/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsol04.dbf' encrypt;
alter database datafile
'/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsol05.dbf' encrypt;
alter database datafile
'/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsol06.dbf' encrypt;
alter database datafile
'/APPSOL/appsol/oradata/oradat_APPSOL/APPSOL/datafile/appsol07.dbf' encrypt;

Now change tablespace online mode.

SQL> @tablespace_online.sql
alter tablespace USERS online;
  alter tablespace APPSOLD online;
  alter tablespace APPSOLX online;
   alter tablespace APPSOLTMPD online;
SQL> select * from v$instance;
SQL> select * from table_name rownum <5;
SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "********";
SQL> select * from v$encryption_wallet;


Check the status of table space encryption by connecting to sqlplus /as sysdba and running the query shown;

$ sqlplus /as sysdba
SQL> select tablespace_name,encrypted from dab_tablespaces;
$ sqlplus /as sysdba
$ administer key management create AUTO_LOGIN keystone from keystone "/APPSOL/appsol/12102/admin/TDE/APPSOL" identified by "*****";
Bounce Database
Backup Database.

Comments

Popular posts from this blog

How to drop index and before dropping it how to get the DDL.

How to set up the Oracle Wallets in Oracle Database 19C

PRVG-11250 : The check "RPM Package Manager database" was not performed because

ORA-00257:archiver error, connect internal only until freed

Linux OL7/RHEL7: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm

SKIP DNS RESLOV.CONF CHECK DURING RAC CONFIGURATION

Verifying Daemon “Avahi-Daemon” Not Configured And Running …FAILED (PRVG-1360)

How to write to a CSV file using Oracle SQL*Plus

Change Password in an Oracle Database