SQL Clone 5

"Pad block corrupted" after changing the user that SQL Clone Server runs as

This error may occur after the SQL Clone Server's service account has been changed, when the SQL Clone Server attempts to decrypt a stored SQL Server login password.

For SQL Clone v4.5.0 and later, please contact support to resolve this.

For earlier versions, 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.


Didn't find what you were looking for?