Topic
After changing the SQL Server License of the SQL server that is hosting the K2 database, K2 service fails to start.
The following error is seen in HostServer logs;
"Error","System","2001","ServerStartError","SourceCode.Hosting.Server.Runtime.HostServerEngine.StartHostServer","2001 Error Starting Host Server: System.NullReferenceException: Object reference not set to an instance of an object."
Which indicates something is wrong with the K2 Configuration Service. The K2 Configuration Service is still running, but the configuration service logs show the following:
[Error] An exception occurred in the database while iterating the results of a query for context type '"SourceCode.Configuration.Repository.ShardContext"'."
""System.Data.SqlClient.SqlException (0x80131904): Please create a master key in the database or open the master key in the session before performing this operation."
Instructions
The configuration service logs indicate the database master key is not opened. If you only changed the SQL Server license, and not perform a database migration, you can run the following to open the master key.
If you have altered the K2 database master key previously, you have to replace the password with the master key password you have configured. If you have never modify the database master key, you can log a support case with Nintex Support to request for the default master key password.
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' -- replace with your master keyALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY
