Seb
Seb

Reputation: 79

Converting/copying an SQL Server database with SBCS Latin1 collation to UTF-8 collation

In SQL Server 2022, we have a database with collation Latin1_General_100_CI_AS_WS_SC, using CHAR/VARCHAR columns (not NCHAR/NVARCHAR).

We want to move to UTF-8.

I created a new DB with collation Latin1_General_100_CI_AS_WS_SC_UTF8, and tried SQL Server Management Studio tool Tasks => Export data... (Using SQL Native Client 11 as client tool)

Seems that it is not supported. The export report shows this error:

- Copying to [dbo].[tab1] (Error)
    Messages
    * Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "The statement has been terminated.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Invalid data for UTF8-encoded characters".
     (SQL Server Import and Export Wizard)

I will try SQL Server Management Studio 20.2

Upvotes: 0

Views: 73

Answers (0)

Related Questions