SAP ASE 16.0 introduces a new built-in function,
dbencryption_status(), which supports the full database encryption
feature by reporting on the encryption/decryption status and progress of a
database.
Reports database encryption/decryption status and
progress. The syntax
is:
dbencryption_status ('status'|'progess', dbid[,
lstart])
where:
- status – returns the encryption status of the database you
specify in dbid. You must supply dbid to
use status. The returned values are:
- 0 – indicates a normal database.
- 1 – indicates that a database is encrypted.
- 2 – indicates that a database is being encrypted.
- 3 – indicates that a database is partially encrypted (but not in the
process of being encrypted).
- 4 – indicates that a database is being decrypted.
- 5 – indicates that a database is partially decrypted (but not in the
process of being decrypted).
- progress – reports on the percentage of encryption/decryption
progress. If you supply:
- dbid – progress returns the
percentage of processed pages in the whole database.
- Both dbid and lstart (the logical
start page) – progress returns the percentage of
processed pages in the fragment indicated by
lstart.
When you use "progress" and SAP ASE finds no progress
information, such as when there is no encryption or decryption operation
occurring, or if the encryption/decryption process is finished, SAP ASE
returns "-1."
- dbid – is the database ID.