Sample for setting encryption parameters for multiple columns
In this sample, we will demonstrate how to set encryption parameters for multiple columns in a tables using the setColProps.properties file. You can configure the setColProps.properties file based on your requirement.
Note
If some columns in the database table are already migrated, the user may migrate the new columns as per the key settings of the already migrated column. This is optional.
# [DB_Host_ip] : IP of SQL Server DB used for connection.Example DB_Host_ip=127.0.0.1 DB_Host_ip=
# [Port_Number] : Port of SQL Server DB used for connection.Port_Number=1433
# [Database Type] : Enter the database type as SQL.DB_Type=SQL
# [Database_Name] :The name of the database to migrate. Example Database_Name = testdbDatabase_Name =
# [Database_User_Login] : The name of the user who owns the database specified in Database_Name.
Database_User_Login = sa
# [Database_User_Password] : The password for the DB user login.
Database_User_Password=passwd
# [DB_Metadata_Database] : The name of the database where the CDP Metadata tables have been installed.
DB_Metadata_Database = metadb
# [DB_Metadata_Schema] : The name of the CDP Metadata table schema.
DB_Metadata_Schema = dbo
# [Table_Name] : The name of the table whose column properties are to be set. Example Table_Name = table1
Table_Name =
# [Columns_To_Migrate] : Specify the comma separated values of the columns to be migrated.
# If all columns are to be migrated, specify the value as ALL.
# In case, any column name that is to be migrated has the name 'ALL', then make sure that it is not the first column specified in the Columns_To_Migrate field. Multiple columns can be specified as col1,col2,col6.
Columns_To_Migrate =
# [Key_Type] : Specify whether the key to be used is versioned key or non versioned key.
# Valid values are versionedKey and nonVersionedKey.
Key_Type=versionedKey
# [Migrated_Column]:
# Option 1: If Migration is to be done on the basis of an already migrated column, then specify the value in [Migrated_Column].
# Option 2: If Migration is not to be done on the basis of any already migrated column, then value in [Migrated_Column] should be blank.
Migrated_Column=
# [Key_Name] : Specify the key name in the following format for standard encyption and CBC mode: Algorithm/KeyName/Padding
# Valid padding is PKCS5Padding.
# In other cases Key_Name format is: Algorithm/KeyName
# Algorithm Name is case-sensitive and valid values are:("AES","SEED","ARIA","DES","DESede")
Key_Name=AES/AES-256/PKCS5Padding
# [Mode] : Specify the mode to be used for migration.
# valid value is CBC or ECB for standarad encryption.
# In case of FPE, valid value is CARD10 or CARD62.
# Note: FPE Formats are not supported in the utility.
Mode=CBC
# [IV_Type] : Specify the IV Type used for Migration.
# In case of ECB mode, IV_Type need not be specified.
# Specify R for row based IV.
# Specify C for column based IV.
IV_Type=C
# [IV_Value] : Specify the value of IV.
# In case of ECB mode, IV_Value need not be specified.
# In case of DES algorithm, IV_Value should be of 8 bytes (Example: 12345678) Otherwise, IV_Value will be 16 bytes (Example: 1234567812345678)
# FOR FPE IV_Value will be hex encoded IV (s-integers(0-9), and 56 Characters in case CARD10 or 32 characters in case of CARD62.
####### e.g.12345678....)
IV_Value = 1234567812345678
# [Tweak_Algo] : Specify the value of Tweak_Algo.
# Tweak_Algo value may be NONE/SHA1/SHA256
Tweak_Algo = NONE
# [Tweak_Data] : Specify the value of Tweak_Data.
# In case of NONE ALGO, Tweak_Data should be HEX encoded value, HEX encoding will consume 16 characters (Example: 1A12121212112A1F) Otherwise, Tweak_Data will be any ASCII string up to 256 character (Example:# 1234567812345678)
Tweak_Data = 1A12121212112A1F
After setting the encryption parameters, double click the setColPros_run
file to execute the migration or use the following command in the CLI:
java -jar setColProps.jar