Description: You can create a database and encrypt the database with an external key.
Keywords: encrypting databases, external key, on creation, databases, creating encrypted, with external key

# Creating an encrypted database with an external key

You can create a database and encrypt the database with an external key.

To create an encrypted database using an external key:

Use the encryptionKey attribute in the connection URL. For example to create the database and encrypt the database `encDB` using an external key, specify this URL:

    jdbc:derby:encDB;create=true;dataEncryption=true;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666768

Attention: If you lose the encryption key you will not be able to boot the database.
Parent topic: Working with the database connection URL attributes
Related tasks
Booting an encrypted database
Encrypting a database when you create it