Azure Keyvault EKM with FCI cluster

Andrii Sydorenko 21 Reputation points
2021-03-31T09:37:25.827+00:00

Hi.
We have a SQL FCI cluster and would like to implement Extensible Key Management Using Azure Key Vault for backup encryption.
I have made all configurations according to the guide (https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/setup-steps-for-extensible-key-management-using-the-azure-key-vault?view=sql-server-ver15&tabs=portal) and everything looked good. I have successfully tested backup and restore. But when I move the cluster to a secondary node I can't do any backups or restores and receive an error:
Msg 15209, Level 16, State 24, Line 3
An error occurred during encryption.
Msg 3013, Level 16, State 1, Line 3
BACKUP DATABASE is terminating abnormally.
After several hours I was identified that Azure EKM wrote some information into [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SQL Server Cryptographic Provider] registry key and of course these settings not migrating between cluster nodes.
82775-image.png
82827-image.png
When I import this setting on the secondary node all my backup jobs started working.
Is it possible to automatically synchronize these settings between nodes or store this information in master DB or other clustered DB?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,714 questions
{count} votes