问题描述
我每天使用 AzureRM for Windows PowerShell 将大约 100 个数据库备份到 BACPAC 文件。
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'.
这个问题大约在一周前开始,总是有相同的 20 个数据库。我尝试使用 Az 模块而不是 AzureRM 和 Azure 门户执行备份,但显示相同的错误。
我认为这是 Azure cmdlet 的一个错误,因为 Int16 是 sql Azure 的数据类型,
请帮忙,我需要每天备份所有数据库。
解决方法
请检查以确保您的源表和目标表具有相同的数据类型。
听起来您可能将源上的一列设置为服务器上的 Int16
和 dateTime
。