Wednesday, September 2, 2015

Encrypted tablespace creation and moving tables to encrypted TBS

CREATE TABLESPACE HMA_ENCRYPT_DATA DATAFILE
  '+DATA_DG' SIZE 10G AUTOEXTEND OFF
LOGGING
ENCRYPTION USING 'AES256'
DEFAULT   STORAGE (ENCRYPT)
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 16K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;


After that create table using following

create table test(id number) tablespace HMA_ENCRYPT_DATA;

or

We can move existing table using

alter table STG_VEHICLE_STATUS_HMMA_UPD move tablespace hma_encrypt_data;


After moving tables indexes become unsuable. So rebuild index as follows

alter index cool rebuild tablespace hma_encrypt_index;

No comments:

Post a Comment

Featured Post

Apply Patch 22191577 latest GI PSU to RAC and DB homes using Opatch auto or manual steps

Patch 22191577: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.4.160119 (JAN2016) Unzip the patch 22191577 Unzip latest Opatch Version in or...