To encrypt a database
Enable database encryption (using the EnableDatabaseEncryption action)
Mark database files for encryption (using the EncryptFile or EncryptFiles action)
Encrypt the marked files (using the ApplyPendingChanges action)
Take a full offline backup of your database when the encryption process is complete, to avoid reprocessing the encryption during recovery.