ALTER SERVICE MASTER KEY

Change the service master key of a SQL Server instance.

Syntax:
       ALTER SERVICE MASTER KEY [FORCE] REGENERATE


       ALTER SERVICE MASTER KEY WITH OLD_ACCOUNT = 'account' , OLD_PASSWORD = 'password'

       ALTER SERVICE MASTER KEY WITH NEW_ACCOUNT = 'account' , NEW_PASSWORD = 'password' 

       ALTER SERVICE MASTER KEY [ { ADD | DROP } ENCRYPTION BY MACHINE KEY ]

FORCE will regenerate the service master key, even at the risk of data loss, if a dependent key cannot be decrypted, the data which that key secures will be lost.

If the SQL Service account is running under the old account, supply the new account/password.

If the SQL Service account is running under a new account, supply the old account/password.

If you change the Windows account under which the SQL Server service runs, you must also enable decryption of the service master key. The SQL Server Configuration Manager can be used to change the service account and will automatically configure all the security and encryption settings.

Example

 ALTER SERVICE MASTER KEY REGENERATE;
GO

"But I have learned a thing or two; I know as sure as fate,
When we lock up our lives for wealth, the gold key comes too late" ~ Will Carleton

Related Commands:

BACKUP SERVICE MASTER KEY
RESTORE SERVICE MASTER KEY


© Copyright SS64.com 1999-2014
Some rights reserved