Using the consolidation tool results in a "Failed" error message due to collation being used.
kbt129385
PRODUCTIssue
L'ID '1033' des paramètres régionaux de la colonne source 'Name' ne correspond pas à l'ID '1036' des paramètres régionaux de la colonne de destination 'Name'.
Error: Aggregate exception: System.AggregateException: Une ou plusieurs erreurs se sont produites. ---> Microsoft.SqlServer.Management.Common.TransferException: An error occurred while transferring data. See the inner exception for details. ---> System.InvalidOperationException: L'ID '1033' des paramètres régionaux de la colonne source 'Name' ne correspond pas à l'ID '1036' des paramètres régionaux de la colonne de destination 'Name'.
à System.Data.SqlClient.SqlBulkCopy.AnalyzeTargetAndCreateUpdateBulkCommand
(BulkCopySimpleResultSet internalResults)
à System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestContinuedAsync
(BulkCopySimpleResultSet internalResults, CancellationToken cts, TaskCompletionSource`1 source)
Symptoms
Using the consolidation tool results in a "Failed" error message due to collation being used.Troubleshooting Steps
By executing the following queries for language and collation analysis, check that all the databases are in the same collation "French_CI_AS"/"Latin1_General_CI_AS":
- Server collation and language
- Server language
FROM sys.syslanguages
WHERE langid=@@langid
- List all the databases with corresponding collation
FROM Sys.Databases
- Analyze the columns
T.[name] AS [table_name], AC.[name] AS [column_name],
TY.[name] AS system_data_type, AC.[max_length],
AC.[precision], AC.[scale], AC.[is_nullable], AC.[is_ansi_padded],AC.Collation_name
FROM sys.[tables] AS T
INNER JOIN sys.[all_columns] AC ON T.[object_id] = AC.[object_id]
INNER JOIN sys.[types] TY ON AC.[system_type_id] = TY.[system_type_id] AND AC.[user_type_id] = TY.[user_type_id]
WHERE T.[is_ms_shipped] = 0
--AND AC.name like '%AIStartDate%'
AND (T.[name] = 'Action' AND OBJECT_SCHEMA_NAME(T.[object_id],DB_ID()) = 'WorkSpace')
OR AC.name like 'Name'
ORDER BY T.[name], AC.[column_id]
- Create a script from the database (with the data):
- Right click on the database "K2 WorkSpace", Task, Generate Script
- Click on the Next button
- Select "Script entire database and all database objects" and click on "Next" button
- Click on the "Advanced" button and change "Type of data to script": to "Schema and data." Click on OK
- Check the output directory and click on the "Next" button
- Click on Next button
- Delete the database "K2 WorkSpace"
- Create the K2 WorkSpace database with the correct collation ("Latin1_General_CI_AS",)
- Modify the script in step 1 and remove the database creation part
- Launch the script.