Note
This view is introduced since OceanBase Database V2.2.77.
Purpose
The V$ENCRYPTED_TABLESPACES view displays the encryption status of tablespaces with encryption enabled.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| 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 tablespaces that have encryption enabled in the current tenant.
obclient [SYS]> SELECT TABLESPACE_ID, ENCRYPTIONALG, ENCRYPTED, STATUS FROM SYS.V$ENCRYPTED_TABLESPACES;
The query result is as follows:
+---------------+---------------+-----------+--------+
| TABLESPACE_ID | ENCRYPTIONALG | ENCRYPTED | STATUS |
+---------------+---------------+-----------+--------+
| 500099 | sm4-cbc | YES | NORMAL |
+---------------+---------------+-----------+--------+
1 row in set
References
To query the encryption status of tables that have encryption enabled, see V$OB_ENCRYPTED_TABLES.
For more information about data at rest encryption, see Data at rest encryption.