Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Master Password and Credentials After Database Restore
#1
Hi,
I noticed the following item in the Rocket Remote Desktop 2027 Patch1 release notes:

"Database - Master Password - can now be set manually (when creating/migrating) - and can be changed via CmdLet."

I have a few questions regarding this feature:

  1. When restoring an MSSQL database backup to another server, does the Database Master Password also need to be migrated or configured separately?
  2. Could the missing or different Database Master Password be the reason why all saved credentials stopped working after restoring the database?
  3. What is the CmdLet name and syntax for setting the Database Master Password?
Could you also provide the relevant documentation or usage examples?
Thank you for your assistance.
Reply
#2
1. Master key migration: The Database Master Key is stored inside the database, so the backup contains it. SQL Server also protects it with the old server's Service Master Key, which is not in the backup. After a restore to another server, the key has to be opened with its password and re-encrypted under the new server's key

2. Credentials stopped working: A missing or different master key password is a likely cause. If the key can't be opened, the shared database key can't be decrypted, and every shared credential fails at once. Private credentials depend on the separate private protection password. An incomplete database migration could also be the cause.

3. Set-RDEnvironmentMasterKeyPassword -DatabaseMasterKeyPassword "MyStrongPassword!"
Regards/Gruss
Oliver
Reply
#3
(10-11-2026, 10:00 AM)DevOma Wrote: 1. Master key migration: The Database Master Key is stored inside the database, so the backup contains it. SQL Server also protects it with the old server's Service Master Key, which is not in the backup. After a restore to another server, the key has to be opened with its password and re-encrypted under the new server's key

2. Credentials stopped working: A missing or different master key password is a likely cause. If the key can't be opened, the shared database key can't be decrypted, and every shared credential fails at once. Private credentials depend on the separate private protection password. An incomplete database migration could also be the cause.

3. Set-RDEnvironmentMasterKeyPassword -DatabaseMasterKeyPassword "MyStrongPassword!"

So, I backed up the MSSQL database on Server A and restored it to Server B. After configuring a new login environment pointing to Server B, I found that all passwords stored in Credentials no longer work.
How should I resolve this issue?
Reply
#4
Private or Public credentials?
Regards/Gruss
Oliver
Reply
#5
(10-11-2026, 10:26 AM)DevOma Wrote: Private or Public credentials?

Public credentials
Reply
#6
Tried myself - created database environment with private and public credentials - backup my database - restored on another database (different SQL instance / server) - connect to existing database - and I can read my private (after entering protection pwd) and public credentials
Regards/Gruss
Oliver
Reply
#7
After restore of db in different server, try running below query replacing the DBname and MasterPassword.

USE [RemoteDesktop];
OPEN MASTER KEY DECRYPTION BY PASSWORD = '<MasterPassword>';
ALTER MASTER KEY DROP ENCRYPTION BY SERVICE MASTER KEY; -- ignore error if absent
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY;
CLOSE MASTER KEY;
Thank You,
Pavan
Reply
#8
(10-11-2026, 10:42 AM)pavankumarc Wrote: After restore of db in different server, try running below query replacing the DBname and MasterPassword.

USE [RemoteDesktop];
OPEN MASTER KEY DECRYPTION BY PASSWORD = '<MasterPassword>';
ALTER MASTER KEY DROP ENCRYPTION BY SERVICE MASTER KEY;  -- ignore error if absent
ALTER MASTER KEY ADD  ENCRYPTION BY SERVICE MASTER KEY;
CLOSE MASTER KEY;

I executed the following SQL statements on the MSSQL instance on Server B, and no errors occurred:

```sql
USE [RocketRemote];
OPEN MASTER KEY DECRYPTION BY PASSWORD = '**********';
ALTER MASTER KEY DROP ENCRYPTION BY SERVICE MASTER KEY; -- ignore error if absent
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY;
CLOSE MASTER KEY;
```

However, after reconnecting to the database on Server B, the Public Credentials are still displayed as blank.

Please see the attached screenshot for reference.
   
   

Additionally, my original server (Server A& Server B) is running Windows Server 2022 with Microsoft SQL Server 2022.
Reply
#9
I guess you have to restore the db again and run above query before connecting RRD, First time there might be some migration issue which made public creds password go blank.
Thank You,
Pavan
Reply
#10
(10-11-2026, 11:00 AM)pavankumarc Wrote: I guess you have to restore the db again and run above query before connecting RRD, First time there might be some migration issue which made public creds password go blank.

I followed your instructions, and it worked! The Public Credentials are now restored successfully.
Thank you very much for your help and support. I really appreciate it!
Reply




Users browsing this thread: 1 Guest(s)