K2 still pinging old SQL server on 1434
Even though the K2 server and database were migrated, it was still trying to connect to the old SQL server, but on port 1434. While data was being written to the correctly migrate K2 database on port 1433, this unnecessary connection on 1434 needed to be addressed.
The culprit was an outdated entry in the Configuration.Shard table referencing the old SQL instance. Here's how to fix it:
1. Identify the correct EnvironmentID:
o Run the provided SQL query to decrypt the Configuration.Shard entries to identify the correct/incorrect row. Replace the ConfigShardIDValue with the EnvironmentID from the SELECT query to decrypt the Value for each row.
SELECT * FROM [Configuration].[Shard]
BEGIN
EXEC [Utility].[EncryptionBegin] @KeyGUID = NULL;
BEGIN TRY
SELECT [EnvironmentID],
(SELECT CONVERT(NVARCHAR(MAX), [Utility].[DecryptData] (CONVERT(VARBINARY(MAX), [Value], 1)))) AS [Value]
FROM [Configuration].[Shard]
WHERE [EnvironmentID] = 'ConfigShardIDValue'
EXEC [Utility].[EncryptionEnd];
END TRY
BEGIN CATCH
EXEC [Utility].[EncryptionEnd];
EXEC [Utility].[ErrorRethrow];
END CATCH;
END
2. Locate the non-matching entry:
o Search for EnvironmentID values within the K2HostServer.exe.config file (usually located at [Install Drive]:\Program Files\K2\Host Server\Bin).
3. Delete the outdated entry:
o Identify the Configuration.Shard entry with the EnvironmentID that doesn't match the correct server configuration (likely containing the old SQL server name) and doesn't match the EnvironmentID key in the K2HostServer.exe.config fie.
o Delete this outdated entry from the Configuration.Shard table.
4. Restart the K2 server service:
o Restart the K2 server service for the changes to take effect.
Following these steps will resolve the issue of the K2 server pinging the old SQL server and ensure it connects to the correct database.
Additional notes:
• Remember to back up your data before making any changes.
Comments
Post a Comment