The current master key cannot be decrypted

We had the requirement to migrate our cluster to a different domain. We knew that Microsoft does not recommend to migrate the existing cluster to a different domain (Read http://support.microsoft.com/kb/269196). The business could not afford the time to build a new cluster in the target domain and move the databases to the SQL Server instance created on target cluster. We uninstalled the SQL server after backing up each database. Server team removed the nodes from the cluster and then moved each node to a new domain. We then installed the SQL Server and attached (since time was constraint) each databases back. All the databases were running fine and we could use them. We restored the master and msdb database so that all the logins, jobs and integration packages are back in place. Later while setting up distribution for replication we faced the first error:

There is no remote user 'distributor_admin' mapped to local user '(null)' from the remote server 'repl_distributor'.
Changed database context to 'master'. (Microsoft SQL Server, Error: 15466)


Service master key is the root of SQL server hierarchy. It was regenerated after the re-install of SQL Server instance. Trying to regenerate the service master key using following command did not help.

ALTER SERVICE MASTER KEY REGENERATE;
GO


After the above command trying to setup distribution gave following error:

Msg 15329, Level 16, State 2, Line 1
The current master key cannot be decrypted. If this is a database master key, you should attempt to open it in the session before performing this operation. The FORCE option can be used to ignore this error and continue the operation but the data encrypted by the old master key will be lost.


After making sure we had no encrypted data the following command was executed and then we were able to configure distribution and setup replication on the server.

ALTER SERVICE MASTER KEY FORCE REGENERATE;
GO


The above command gave following output:

The current master key cannot be decrypted. The error was ignored because the FORCE option was specified.

Comments

Make Money from Surveys

Popular posts from this blog

Schema.Object has an unresolved reference to Schema

There is insufficient memory available in the buffer pool