Decrypt column
Step
To unencrypt columns of a table, run the following command:
./pdbctl unmigrate <col1 col2 ...> -a <database_alias> -t <table_name>
Flags description
The following table describes the flags and parameters associated with this command:
Flag | Data Type | Description |
---|---|---|
-b | int | Batch size to be unmigrated. The value must be an integer. This is an optional parameter. Default values: > 1 - For large data types > 1000 - For other data types. |
-a | string | Database alias associated with the database user. |
-h | Flag to view help for the unmigrate command. | |
-t | string | Table name to be decrypted. |
--verbose | Print verbose logs. |
Note
When performing unencryption of large data types with batch size > 1, the following message is displayed:
Unencrypting large datatype column(s) with batch size greater than 1 fails if it contains any data greater than 3936.
Continue only if the data length is ≤ 3936, otherwise, use the default batch size.
Example
The following sample command decrypts the column CITY
in the table CUSTOMERS
associated with alias demo
:
./pdbctl unmigrate -a demo -t CUSTOMERS CITY
Output
Processing...
: Job Id 135 |
Status :success
Unencrypting a column removes the encryption parameters from that column. Use the use the listcolumns
command to view the encryption parameters.
For example, to check the encryption parameters for the columns in the table CUSTOMERS, use the listcolumns
command.
./pdbctl listcolumns -a demo -t CUSTOMERS
The output is:
---------------------------------------------------------------
Column name: CUSTOMER_ID
Column type: NUMBER
Column width: 10
Column key: aes256
Column Algorithm: AES
Column Migrated: false
Column IV: 8D74E7CC0E659F2D8A8BC417750856FE
---------------------------------------------------------------
Tip
After decrypting a table, it is recommended to remove the un-needed ciphertext. Refer to Delete data after encryption or decryption for details.