I am trying to migrate a local SQL database to an Azure SQL database using Azure Data Studio and the Azure SQL Migration instance. However, the migration fails for tables containing encrypted data (using the Always Encrypted feature).
Steps Taken:
- Configured the Azure SQL Migration extension in Azure Data Studio.
- Selected the local database for migration, which includes several tables with columns encrypted using Always Encrypted.
- Initiated the migration to Azure SQL Database.
Issue:
The migration fails, and I encounter the following error:
Failure happened on ‘Sink’ side. ErrorCode=SqlOperationFailed,’Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed. Please search error to get more details.,Source=Microsoft.DataTransfer.ClientLibrary,”Type=System.Data.SqlClient.SqlException,Message=Invalid column type from bcp client for colid 3.,Source=.Net SqlClient Data Provider,SqlErrorNumber=4816,Class=16,ErrorCode=-2146232060,State=4,Errors=[{Class=16,Number=4816,State=4,Message=Invalid column type from bcp client for colid 3.,},],’
How can I fix this error?
Osura Dissanayake is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.