Keywords: dataEncryption=true attribute, encrypting databases, data encryption, databases, attributes, data encryption, attributes, dataEncryption

# dataEncryption=true attribute

#### Function

Specifies data encryption on disk for a new database or to configure an existing unencrypted database for encryption. For information about data encryption, see "Encrypting databases on disk" in the Java DB Developer's Guide.

#### Combining with other attributes

The dataEncryption attribute must be combined with the bootPassword=key attribute or the newEncryptionKey=key attribute. You have the option of also specifying the encryptionProvider=providerName and encryptionAlgorithm=algorithm attributes.

For an existing, unencrypted database for which authentication and SQL authorization are both enabled, only the database owner can perform encryption. See also "Enabling user authentication" and "Setting the SQL standard authorization mode" in the Java DB Developer's Guide for more information.

#### Examples

     -- encrypt a new database
    jdbc:derby:encryptedDB;create=true;dataEncryption=true;
        bootPassword=cLo4u922sc23aPe
     -- configure an existing unencrypted database for encryption
       jdbc:derby:salesdb;dataEncryption=true;bootPassword=cLo4u922sc23aPe

Parent topic: Setting attributes for the database connection URL