Uninstalling CAKM for Microsoft SQL Server EKM Provider
In case you need to uninstall the CAKM for Microsoft SQL Server EKM Provider, the InstallShield wizard also provides this capability. If the wizard detects that the provider has already been installed, it allows you to remove the current installation.
Before you uninstall the provider, perform the following steps:
Unencrypt the database using the following commands:
USE master; ALTER DATABASE <db_name> SET ENCRYPTION OFF; GO
Run the following query to check the encryption status of the database:
select db.name, case dbe.encryption_state when 0 then 'No database encryption key present, no encryption' when 1 then 'Unencrypted' when 2 then 'Encryption in progress' when 3 then 'Encrypted' when 4 then 'Key change in progress' when 5 then 'Decryption in progress' when 6 then 'Protection change in progress (The certificate or asymmetric key that is encrypting the database encryption key is being changed.)' end EncryptionState , dbe.percent_complete from sys.dm_database_encryption_keys dbe inner join sys.databases db on db.database_id = dbe.database_id
Drop the database encryption key using the following command:
USE <db_name>; GO DROP DATABASE ENCRYPTION KEY
Drop the credential using the following steps:
Use alternate login.
ALTER LOGIN <login_name>
Delete the credential from SQL Server.
DROP CREDENTIAL <credential_name>
Delete the login from SQL Server
DROP LOGIN <login_name>
Delete the asymmetric key from the provider.
DROP ASYMMETRIC KEY <key_name_in_sql_server>
Drop the CAKM for Microsoft SQL Server EKM provider.
DROP CRYPTOGRAPHIC PROVIDER <provider_name>
Uninstalling Microsoft SQL Server EKM Provider Silently
To uninstall the CAKM for Microsoft SQL Server EKM provider silently
, execute the following command:
setup.exe /x /s /v/qn
Uninstalling Microsoft SQL Server EKM Provider using GUI
To uninstall the CAKM for Microsoft SQL Server EKM provider using GUI:
Double-click the setup executable to launch the InstallShield Wizard. The wizard detects the current installation.
Click Next to access the Program Maintenance screen.
Select Remove and then click Next.
Click Remove.
After the files are uninstalled, click Finish to complete the process.
Moreover, you can also uninstall the provider from the Control Panel.
Uninstalling Microsoft SQL Server EKM Provider with Expired Certificate of DLL
Note
Ensure that you take a backup of certs
folder and cakm_mssql_ekm.properties
file before performing the uninstallation.
Perform the following steps to uninstall CAKM for Microsoft SQL Server EKM provider with expired dll certificate:
To uninstall the provider
silently
, refer to Uninstalling Microsoft SQL Server EKM Provider Silently section.To uninstall the provider using
GUI
, refer to Uninstalling Microsoft SQL Server EKM Provider using GUI section.Install CAKM for Microsoft SQL Server EKM provider with latest signed dll.