Note
This view is available starting with V4.0.0.
Purpose
This view displays the encryption status of tables with encryption enabled in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | The tenant ID. |
| TABLE_ID | bigint(20) | NO | The table ID. |
| TABLE_NAME | varchar(256) | NO | The table name. |
| TABLESPACE_ID | bigint(20) | NO | The tablespace ID. |
| ENCRYPTIONALG | varchar(30) | NO | The name of the encryption algorithm. Valid values:
|
| ENCRYPTED | varchar(3) | NO | Indicates whether the table is encrypted. Valid values:
|
| ENCRYPTEDKEY | varchar(33) | NO | The encrypted key encrypted by the master key. |
| MASTERKEYID | bigint(20) unsigned | NO | The version of the master key. |
| BLOCKS_ENCRYPTED | decimal(20,0) | NO | The number of encrypted macroblocks. |
| BLOCKS_DECRYPTED | decimal(21,0) | NO | The number of unencrypted macroblocks. |
| STATUS | varchar(10) | NO | The encryption status. Valid values:
|
| CON_ID | bigint(20) | NO | The tenant ID. |
Sample query
Query the encryption status of tables with encryption enabled in the current tenant.
obclient [oceanbase]> SELECT TABLE_NAME, ENCRYPTIONALG, ENCRYPTED FROM oceanbase.V$OB_ENCRYPTED_TABLES;
The query result is as follows:
+------------+---------------+-----------+
| TABLE_NAME | ENCRYPTIONALG | ENCRYPTED |
+------------+---------------+-----------+
| t1 | aes-256 | YES |
+------------+---------------+-----------+
1 row in set
References
For more information about transparent data encryption, see Transparent data encryption.
