SQL Clone 4

Help for older versions available.

These pages cover SQL Clone 4, which is not the latest version. Help for other versions is also available.

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

 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 Toggle source code

  1. # Open a powershell window on the Clone Server machine with the old account details
  2. Add-Type -Path "C:\Program Files\Red Gate\SQL Clone Beta\RedGate.SqlClone.Credentials.dll"
  3. $credentialLocker = new-object RedGate.SqlClone.Credentials.WindowsCredentialsLocker
  4. $credentialLocker.GetCredential("SqlCloneDbKey") #Please manually copy this to the clipboard
  5.  
  6.  
  7. # Open a powershell on the Clone Server machine with the new account details and paste the key copied above
  8. $keyToMigrate = 'paste key in here'
  9. Add-Type -Path "C:\Program Files\Red Gate\SQL Clone Beta\RedGate.SqlClone.Credentials.dll"
  10. $credentialLocker = new-object RedGate.SqlClone.Credentials.WindowsCredentialsLocker
  11. $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?