To create a fully encrypted database, use the create database
command.
Specify whether to encrypt
a database when you create it, and data inserted into the database is automatically
encrypted. The size of the database does not change when it is encrypted, and all
storage access functions work identically whether a database is encrypted or not. The
types of databases that support encryption are:
- Normal user database
- Temporary database
- Archive database
You cannot encrypt an in-memory database.
To create an encrypted database, use:
create [temporary] database database_name
encrypt with key_name
Where:
- database_name is the name of the encrypted database you are
creating.
- key_name is the name of the database encryption key.
To create an encrypted archive
database, use:
create archive database database_name
encrypt with key_name
Where:
- database_name is the name of the archive database you are
creating
- key_name is the same key that you used to encrypt the
database that was backed up. SAP ASE verifies that
key_name matches during the database load. If it does
not match, the restoration fails.
Example
Creates an encrypted database called
demodb with data on device
demodev and log on device
demologdev, using an
encryption key called
dbkey:
create database demodb on demodev log on demologdev encrypt with dbkey
Usage
There is no special permission to use the encrypt with option of the
create database command. Users however, need
select permission on the database encryption key to be able
to reference it as the key_name.