You can encrypt a database during creation by using the ENCRYPTED clause with the CREATE DATABASE statement.
Prerequisites
By default, you must have the SERVER OPERATOR system privilege. The required privileges can be changed by using the -gu database server option.
Context and remarks
This task is different from encrypting an existing database. To encrypt an existing database, use the CREATE ENCRYPTED DATABASE statement.
For strongly encrypted databases, store a copy of the key in a safe location. If you lose the encryption key, there is no way to access the data—even with the assistance of Technical Support. The database must be discarded and you must create a new database.
In Interactive SQL, connect to an existing database.
Execute a CREATE DATABASE statement that includes the ENCRYPTED clause and the KEY and ALGORITHM options.
Example
For example, the following statement creates a database file named myencrypteddb.db in the c:\temp\ directory using FIPS-certified 128-bit AES encryption. It also creates a user ID DBA with password sql.
CREATE DATABASE 'c:\\temp\\myencrypteddb.db' DBA USER 'DBA' DBA PASSWORD 'sql' TRANSACTION LOG ON ENCRYPTED ON KEY '0kZ2o52AK#' ALGORITHM 'AES_FIPS'; |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |