Sintomas
Quando instala o Microsoft SQL Server 2014 com preferências predefinidas, a propriedade de idioma é Inglês (Estados Unidos) us_english e a ordem predefinida para a data é mdy. Se a ordem da data do sistema operacional for diferente desta, ao configurar o Backup Gerenciado para Windows Azure, você receberá as seguintes mensagens de erro após a conclusão do backup:
Erro:
Nota
SqlError, Code = 242, Stage = Undefined, Message = A conversão de um tipo de dados varchar para um tipo de dados datetime resultou num valor fora do intervalo. A instrução foi encerrada.
Pilhar:
Nota
em System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action'1 wrapCloseInAction)
em System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
em System.Data.SqlClient.TdsParser.TryRun(RunBehavior, runBehavior, SqlCommand, cmdHandler, SqlDataReader, dataStream, BulkCopySimpleResultSet, bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
em System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader, ds, RunBehavior, runBehavior, String, resetOptionsString)
em System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource'1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
em System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(conclusão de TaskCompletionSource'1, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
em System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
em Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.FileService.InsertOneRowForHelperTable(SmartBackupFilesTableRow row, SqlConnection conn, Boolean& isDuplicate)
em Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.FileService.GetLastLSNAndInsertToHelperTable(System.String, System.String, System.Guid, System.Nullable'1<System.Guid>, System.String, System.Nullable'1<System.Decimal> ByRef, System.Nullable'1<System.Decimal> ByRef, System.Nullable'1<System.Guid> ByRef, System.Nullable'1<System.Decimal> ByRef)
em Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.SmartBackup.DoJobOutcomeVerification(Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.AutoBackupDBData)
em Microsoft.SqlServer.SmartAdmin.SmartBackupAgent.SmartBackup.DoWork()
em System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
em System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
em System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) em System.Threading.ThreadHelper.ThreadStart()
Resolução
Este problema foi corrigido na seguinte atualização cumulativa do SQL Server.
Atualização cumulativa 5 para SQL Server 2014 /pt-pt/help/3011055
Acerca das atualizações cumulativas para SQL Server
Cada nova atualização cumulativa para SQL Server contém todos os hotfixes e todas as correções de segurança que foram incluídas com a atualização cumulativa anterior. Consulte as atualizações cumulativas mais recentes para SQL Server:
Estado
A Microsoft confirmou que se trata de um problema nos produtos Microsoft listados na secção "Aplica-se a".