dbd_export_keys

exec dbd_export_keys

This function is automatically created in an ncrypted database at the moment of encryption. The database must be initially unlocked with the OPEN SYMMETRIC KEY DBDX statement. Call this procedure in the context of an 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 the extension .dbd_key. If you want to transfer the database to another computer, copy the database and key files.

By default, DbDefence creates exportable keys in the same folder with the database files.

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

Return Code Values

0 for success otherwise failure

Example

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

Remarks

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