Note
This view is available starting with V4.0.0.
Purpose
This view displays the encryption status of tables with encryption enabled.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| 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: |
| ENCRYPTED | varchar(3) | NO | Indicates whether the table is encrypted: |
| ENCRYPTEDKEY | varchar(33) | NO | The encryption 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: |
| CON_ID | bigint(20) | NO | The tenant ID. |
Sample query
Query the encryption status of tables with encryption enabled under 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 detailed information and instructions on transparent data encryption, see Transparent data encryption.