"Pad block corrupted" after changing the user that SQL Clone Server runs as
Published 08 February 2017
If you wish to change the user running the SQL Clone Server, there's an encryption key stored securely which must be migrated. To do this you'll need two Powershell windows open. One running under the old credentials, and one running under the new credentials. To run Powershell as a different user, find it on the start menu, hold shift, and right click on the shortcut - "run as a different user" should be one of the options.
Migrate encryption key
# Open a powershell window on the Clone Server machine with the old account details Add-Type -Path "C:\Program Files\Red Gate\SQL Clone Beta\RedGate.SqlClone.Credentials.dll" $credentialLocker = new-object RedGate.SqlClone.Credentials.WindowsCredentialsLocker $credentialLocker.GetCredential("SqlCloneDbKey") #Please manually copy this to the clipboard # Open a powershell on the Clone Server machine with the new account details and paste the key copied above $keyToMigrate = 'paste key in here' Add-Type -Path "C:\Program Files\Red Gate\SQL Clone Beta\RedGate.SqlClone.Credentials.dll" $credentialLocker = new-object RedGate.SqlClone.Credentials.WindowsCredentialsLocker $credentialLocker.SetCredential("SqlCloneDbKey", $keyToMigrate)
Once the system is working again, you may optionally clear the key for the old account to further improve security.