exec dbd_export_keys

This function is automatically created in encrypted database at the moment of encryption. The database must be initially unlocked with OPEN SYMMETRIC KEY DBDX statement. Call this procedure in the context of encrypted database.

dbd_export_keys exports encryption keys from Windows local storage to the folder with database files. For each database file DbDefence creates a file with extension .dbd_key. If you want to transfer the database to another computer copy database and key files.

By default, DbDefence creates exportable keys.

Warning: files are deleted from Windows local storage after the export.

Return Code Values

0 for success otherwise failure


use [mydatabase]
open symmetric key dbdx decryption by password='MyPass'
exec dbd_export_keys


To import keys into Windows local storage protected by Windows Data Protection API run dbd_import_keys.