Updated on 2026-09-24 GMT+08:00

Single-table Batch Encryption

Single-table batch encryption provides a fast encryption and decryption capability for existing historical data across multiple fields within a single table.

In many scenarios, a table may contain multiple fields that need to be encrypted; encrypting each field individually can consume more encryption time. To improve encryption efficiency and reduce the total encryption time for existing historical data, the system provides a batch encryption feature that allows for the simultaneous encryption of multiple fields across existing historical data.

When configuring an encrypted table-level view, just as with single-field encryption, click Batch Encryption – the system will then automatically perform the following three tasks:

  • Prevent accidents by backing up existing historical data.
  • When data is encrypted, its length increases; therefore, the system automatically determines the length for the SQL extended column.
  • Encrypt existing historical data.

Additionally, after clicking Batch Encryption, you will encounter three different scenarios, as shown in Table 1.

Table 1 How to perform batch encryption and decryption

Order Number

Encryption Algorithm/Key Configuration

Existing Historical Data Encryption Status

Action Execution after Clicking the Button

1

All columns requiring encryption must be configured with an encryption algorithm and a key.

All historical data for all columns is unencrypted.

Encrypt all fields.

2

All columns requiring encryption must be configured with an encryption algorithm and a key.

Some existing data is encrypted; some is not encrypted.

Encrypts only unencrypted columns.

3

All columns requiring encryption must be configured with an encryption algorithm and a key.

Full encryption of existing data

Only checks whether there is data that requires encryption; encryption is not performed.

Batch Decryption is the counterpart to Batch Encryption and is used to decrypt all encrypted fields in a table in a single operation.

Procedure

  1. Logging In to the Database Encryption System using the system administrator (sysadmin) account.
  2. Select Project Management from the left navigation tree.
  3. Hover your mouse over the item you wish to configure, then click Enter to access the item.
  4. In the left navigation tree, select Encryption Settings> Encryption Policy Settings.
  5. For fields that already have their keys configured, click Batch Encryption or Batch Decryption to perform batch processing, as shown in Figure 1.

    Figure 1 Batch process

Batch encryption and decryption can be performed by clicking the button multiple times.

The execution logic varies depending on the specific scenario; this is illustrated in Table 1.