SQL Master Key Password FAQs

SQL Master Key Password FAQs

  • How to create the master key password.

The user with dbcreator permissions can follow these steps to create the master key password:

Open MSSQL Server Management Studio, right-click the database and choose New Query

In the workspace, run the following query:

CREATE MASTER KEY ENCRYPTION BY PASSWORD='<new_Masterkey_password>';
The master key password must comply with the password policy of the MSSQL-installed machine. 

Top

  • How to change the master key password. 

The user with dbcreator permissions can follow these steps to change the master password:

Open MSSQL Server Management Studio, right-click the database and choose New Query

For regenerating the database master key and all other keys, run the following query:

ALTER MASTER KEY REGENERATE WITH ENCRYPTION BY PASSWORD='<new_Masterkey_password>';

To create an additional master key password, run the following query:

ALTER MASTER KEY ADD ENCRYPTION BY PASSWORD='<new-master_key>';

Note that after you create an alternative master key password, the old master key password will still be functional. 

Top

  • How to take backup of the master key password.

Open MSSQL Server Management Studio, right-click the database and choose New Query

 In the workspace, run the following query:

BACKUP MASTER KEY TO FILE = 'path_to_file' ENCRYPTION BY PASSWORD = '<Masterkey_password>';

Top

  • How to restore the master key password?

Open MSSQL Server Management Studio, right-click the database and choose New Query

In the workspace, run the following query:

RESTORE MASTER KEY FROM FILE = 'path_to_file' DECRYPTION BY PASSWORD = '<masterkey_password_of_backup_database>' ENCRYPTION BY PASSWORD = '<masterkey_password_of_restoring_database>';

The master key password will be restored to the database.

Top

  • Why does the master key password fail during upgrade? 

This can happen of the password doesn't comply with the password policy of the MSSQL-installed machine. 

                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • How to reset administrator password in ServiceDesk Plus MSP

                        Follow the below steps to reset Administrator password for builds more than 10600 (To reset the password for less than 10600. Please contact support. ) 1.Connect to the DB Server. i) For MS-SQL-Connect to the MS-SQL Server ii) For Postgres, go to ...
                      • Backup password protection

                        The application backup is protected with a password. The password is required to open the backup file / restore it. This password can be changed in the Admin-> Backup schedule page. Click Edit Scheduling and input the backup password to change the ...
                      • Forgot password option missing

                        If Forgot password option missing in the login page, then please check the below option under Admin->Self-Service Portal Settings. If this option is disabled, then the Forgot password option will not be visible in the login page. Allow users to login ...
                      • Customize password reset email

                        Steps to customize the email sent for resetting the password of a technician or requester Follow the below steps to customize the password reset link email content: 1. Admin -> Settings -> General settings -> translations 2. In the search bar enter ...
                      • Roles required for SQL user

                        The recommended login account for creating the database requires SQL authentication and it should have the following roles enabled: * dbcreator * Public * Sysadmin If you do not want to provide Sysadmin role to the user, db_creator and Public roles ...