Network Management
Collation conflict between "Latin1_General_CI_AS" and "Latin1_General_100_CI_AS_KS_WS_SC" during configuration wizard on SolarWinds Platform 2024.4
The article discusses an error that occurs when the Configuration Wizard fails to complete after upgrading to 2024.4 for the SolarWinds Platform.
First published date
Last published date
Overview
After upgrading to SolarWinds Platform 2024.4, you might encounter the following error message during the configuration wizard:
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_100_CI_AS_KS_WS_SC"
in the equal to operation.
Errors were encountered in the procedure 'dbo.OrionLog_GetTablesForStatisticsUpdate'
during compilation of the object. Either the containment option of the database 'SolarWindsOrionLog'
was changed, or this object was present in model db and the user tried to create a new contained database.
ALTER DATABASE statement failed. The containment option of the
database 'SolarWindsOrionLog' could not be altered because compilation errors were encountered during validation of SQL modules.
See previous errors.
ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 468)
The error message may appear in the Configuration Wizard log (located at C:\ProgramData\SolarWinds\Logs\Orion\ConfigurationWizard.log):
•ERROR TaskAdapter - Error running task Orion.ConfigurePluginDatabaseComponents Configuring database components for plugins
SolarWinds.ConfigurationWizard.Common.ConfigurationException: Error while configuring component Orion.ConfigurePluginDatabaseComponents. ---> SolarWinds.ConfigurationWizard.Plugin.Orion.ConfigurePluginComponents+ComponentConfigurationException: Aborting configuration ---> SolarWinds.ConfigurationWizard.Common.ConfigurationException: Error while executing script- Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "Latin1_General_100_CI_AS_KS_WS_SC" in the equal to operation.
at SolarWinds.ConfigurationWizard.Plugin.Common.DBConfigProcessor.ExecuteSqlBatch(IDbConnection connection, String sqlQuery, ConfigurationLogDelegate configLog)
at SolarWinds.ConfigurationWizard.Plugin.Common.DBConfigProcessor.Process(IDbConnection connection, ConfigurationProgressDelegate progress, String scriptFile, ConfigurationLogDelegate logger)
at SolarWinds.ConfigurationWizard.Plugin.LogMgmt.LogStorageConfigurator.ConfigureDatabase()
at SolarWinds.ConfigurationWizard.Plugin.LogMgmt.LogStorageConfigurator.Configure(ConfigurationProgressDelegate progress, ConfigurationLogDelegate logger)
at SolarWinds.ConfigurationWizard.Plugin.LogMgmt.OrionLogPlugin.ConfigureDatabase(IOrionConfigHost host, ConfigurationProgressDelegate progress, ConfigurationLogDelegate logger)
at SolarWinds.ConfigurationWizard.Plugin.LogMgmt.OrionLogPlugin.DoConfigure(IOrionConfigHost host, IComponentInfo component, ConfigurationProgressDelegate progress, ConfigurationLogDelegate log)
at SolarWinds.ConfigurationWizard.Plugin.Common.OrionConfigPlugin.SolarWinds.ConfigurationWizard.Common.IOrionConfigPlugin.DoConfig(IOrionConfigHost host, IComponentInfo component, ConfigurationProgressDelegate progress, ConfigurationLogDelegate log)
at SolarWinds.ConfigurationWizard.Plugin.Orion.ConfigurePluginComponents.ConfigureComponents(IOrionConfigPlugin plugin, ICollection`1 components, IConfigurationWizardTaskProgressReporter progressReporter, ConfigurationLogDelegate logDelegate)
--- End of inner exception stack trace ---
at SolarWinds.ConfigurationWizard.Plugin.Orion.ConfigurePluginComponents.ConfigureComponents(IOrionConfigPlugin plugin, ICollection`1 components, IConfigurationWizardTaskProgressReporter progressReporter, ConfigurationLogDelegate logDelegate)
at SolarWinds.ConfigurationWizard.Plugin.Orion.ConfigurePluginComponents.RunSync(IConfigurationWizardTaskProgressReporter progressReporter, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at SolarWinds.ConfigurationWizard.Plugin.Orion.ConfigurePluginComponents.RunSync(IConfigurationWizardTaskProgressReporter progressReporter, CancellationToken cancellationToken)
at SolarWinds.ConfigurationWizard.Common.TaskEngine.ConfigurationWizardTaskBaseSynchronous.RunAsync(IConfigurationWizardTaskProgressReporter progressReporter, CancellationToken cancellationToken)
at SolarWinds.ConfigurationWizard.Host.TaskEngine.TaskAdapter.<RunAsync>d__47.MoveNext()
Failing SQL Command:
• CREATE PROCEDURE [dbo].[OrionLog_GetTablesForStatisticsUpdate]
AS
BEGIN
DECLARE @MessageTableNamePrefix AS nvarchar(25) = N'OrionLog_LogEntryMessage_';
DECLARE @TableToUpdateNames AS TABLE(TableName nvarchar(60));
DECLARE @TodayUtc AS DATE = GETUTCDATE();
DECLARE @MessageTableNames AS TABLE(TableName nvarchar(35) PRIMARY KEY);
WITH DateRange AS (
SELECT DATEADD(day, -2, @TodayUtc) AS [Date]
UNION ALL
SELECT DATEADD(day,1,[Date])
FROM DateRange
WHERE DATEADD(day,1,[Date]) <= @TodayUtc
)
INSERT INTO @MessageTableNames
SELECT @MessageTableNamePrefix + CONVERT(nvarchar(10), [dbo].[BoundaryValueFromElements](dr.Date, les.LogEntrySourceID))
FROM DateRange dr full outer join [dbo].[OrionLog_LogEntrySource] les WITH(NOLOCK) on 1=1
ORDER BY dr.Date, les.LogEntrySourceID;
INSERT INTO @MessageTableNames
VALUES (@MessageTableNamePrefix + N'dump');
INSERT INTO @TableToUpdateNames
SELECT quotename(SCHEMA_NAME(schema_id), '[') +'.'+ quotename(rtrim([name]), '[') AS TableName
FROM sys.objects
WHERE [type] = 'U' AND [name] IN (SELECT TableName FROM @MessageTableNames)
ORDER BY TableName;
DECLARE @MessageTableMask AS nvarchar(26) = @MessageTableNamePrefix + N'%';
INSERT INTO @TableToUpdateNames
SELECT quotename(SCHEMA_NAME(schema_id), '[') +'.'+ quotename(rtrim([name]), '[') AS TableName
FROM sys.objects o
WHERE o.type = 'U' AND NOT [name] LIKE @MessageTableMask
ORDER BY TableName;
SELECT TableName
FROM @TableToUpdateNames
ORDER BY TableName;
END
Product section
Cause
The issue occurs due when the following conditions are met:
- Running SolarWinds Platform 2024.4 only
- SQL environment is using contained databases
Starting in SolarWinds Platform 2024.4, a new stored procedure was added that queries data from the sys.* view. When the database is not contained, this view is located in the master database and has the expected collation. However, when a database is Contained, these views are moved to the database, and varchar fields have the Latin1_General_100_CI_AS_KS_WS_SC collation, which causes conflicts with the database collation.
Resolution
To resolve this issue, please upgrade to SolarWinds Platform 2024.4.1 and above.
If you are attempting to install SolarWinds Platform 2024.4, the only option is to revert SolarWinds Platform to the previous version or upgrade to the latest release.