Error trying export SQL Azure database to BACPAC file

439 views Asked by At

I daily backup around 100 databases to BACPAC file using AzureRM for Windows PowerShell.

For some reason 20 of these databases started to throw an strange error:

Could not export schema and data from database. One or more errors occurred. One or more errors occurred. One or more errors occurred. One or more errors occurred. One or more errors occurred. Failed to convert parameter value from a Int16 to a DateTime. Invalid cast from 'Int16' to 'DateTime'.

This issue started about a week ago, always with the same 20 databases. I tried perform the backup with the Az Module instead AzureRM, and with the Azure Portal, but the same error are shown.

I think it's a bug of the Azure cmdlets because Int16 istn a datatype of SQL Azure,

Help please, i need to backup all databases daily.

1

There are 1 answers

0
Harshita Singh On

Pls check to make sure your source and destination tables have the same data types.

It sounds like you might have a column on the source set to Int16 and dateTime on the server.