Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays the encryption status of tables with encryption enabled in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TABLE_ID | NUMBER(38) | NO | The ID of the table. |
| TABLE_NAME | VARCHAR2(256) | NO | The name of the table. |
| TABLESPACE_ID | NUMBER(38) | NO | The ID of the tablespace. |
| ENCRYPTIONALG | VARCHAR2(30) | NO | The name of the encryption algorithm. Valid values: |
| ENCRYPTED | VARCHAR2(3) | NO | Indicates whether the encryption is completed. Valid values: |
| ENCRYPTEDKEY | VARCHAR2(32) | NO | The encryption key encrypted by the master key. |
| MASTERKEYID | NUMBER(38) | NO | The ID of the master key. |
| BLOCKS_ENCRYPTED | NUMBER | NO | The number of encrypted macroblocks. |
| BLOCKS_DECRYPTED | NUMBER | NO | The number of macroblocks that are not encrypted. |
| STATUS | VARCHAR2(10) | NO | The encryption status. Valid values: NORMAL: normalENCRYPTING: being encryptedDECRYPTING: being decrypted |
| CON_ID | NUMBER(38) | NO | The ID of the tenant. |
Sample query
Query the encryption status of tables that have encryption enabled in the current tenant.
obclient [SYS]> SELECT TABLE_NAME, ENCRYPTIONALG, ENCRYPTED FROM SYS.V$OB_ENCRYPTED_TABLES;
The query result is as follows:
+------------+---------------+-----------+
| TABLE_NAME | ENCRYPTIONALG | ENCRYPTED |
+------------+---------------+-----------+
| T1 | sm4-cbc | YES |
+------------+---------------+-----------+
1 row in set
References
For more information about data transparent encryption, see Data transparent encryption.