SQL Server to Azure deployment problem

Michael Gaihede 1 Reputation point
2021-09-29T14:17:21.49+00:00

I have deployed a couple of smaller databases (from SQL Server 2019 as source) to Azure without any problem - using SSMS v. 18.7.1 I have, however, tried to deploy a substantial database (db files app. 480GB) to Azure and then the deployment fails for 6 out of 135 tables. The destination server has been selected as STANDARD with 1TB of max. disk space.

136343-image.png

Unfortunately, getting the provided error text does not give any insight (see below), so I am wondering if anybody has any idea to solve the problem?

Note that all the failed tables have a substantial record count - notably:

[AnnaDsbIsins] 65.882.758
[CmpEsmaFirdsIsinIssures] 49.698.163
[EsmaFirdsInstruments] 75.907.080
[EsmaFitrsInstruments] 71.622.445
[EsmaFirdsInstrumentDerivatives] 71.423.518
[AnnaDsbToTvs] 100.299.293

===================================

Could not export schema and data from database. (Microsoft.SqlServer.Dac)

------------------------------

Program Location:

at Microsoft.SqlServer.Dac.DacServices.<>c__DisplayClass65.<>c__DisplayClass67.<CreateExportOperation>b__63()
at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action)
at Microsoft.SqlServer.Dac.DacServices.<>c__DisplayClass65.<CreateExportOperation>b__62(Object operation, CancellationToken token)
at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.ExportBacpac(Func1 streamGetter, String databaseName, DacExportOptions exportOptions, IEnumerable1 tables, CancellationToken cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.ExportBacpac(String packageFileName, String databaseName, DacExportOptions options, IEnumerable1 tables, Nullable1 cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.ExportBacpac(String packageFileName, String databaseName, DacSchemaModelStorageType modelStorageType, IEnumerable1 tables, Nullable1 cancellationToken)
at Microsoft.SqlServer.Management.Dac.DacWizard.ExportDatabase.DoWork()
at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Run()

===================================

One or more errors occurred. (mscorlib)

------------------------------

Program Location:

at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.Export.ExportBacpacHelper.ExportBacpac(List1 exportTableHelpers) at Microsoft.Data.Tools.Schema.Sql.Dac.Data.ExportBacpacStep.ExportBatch(List1 batch, ConnectionManager connectionManager)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.ExportDataStep.Execute(Boolean isAlwaysEncrypted)
at Microsoft.SqlServer.Dac.DacServices.<>c__DisplayClass65.<>c__DisplayClass67.<CreateExportOperation>b__63()

===================================

One or more errors occurred.

===================================

One or more errors occurred.

===================================

One or more errors occurred.

===================================

One or more errors occurred.

===================================

Data is Null. This method or property cannot be called on Null values. (System.Data)

------------------------------

Program Location:

at System.Data.SqlClient.SqlBuffer.get_Int64()
at System.Data.SqlClient.SqlDataReader.GetInt64(Int32 i)
at Microsoft.Data.Tools.Schema.Sql.SqlClient.Bcp.Int64Serializer.GetValueBytes(SqlDataReader source)
at Microsoft.Data.Tools.Schema.Sql.SqlClient.Bcp.FixedLengthSerializer.<GetBytes>d__0.MoveNext()
at Microsoft.Data.Tools.Schema.Sql.SqlClient.Bcp.SqlRawStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.Export.ExportTableBatchHelper.WriteRow(DataReaderIterator dataReaderIterator)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.Export.ExportTablePartHelper.ProcessDataBatch(DataReaderIterator dataReaderIterator, RetryState retryState)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.Export.ExportTablePartHelper.ExportTableWithRetryState(RetryState retryState)
at Microsoft.Data.Tools.Schema.Common.SqlClient.RetryPolicy.<>c__DisplayClass4.<ExecuteAction>b__3(RetryState retryState)
at Microsoft.Data.Tools.Schema.Common.SqlClient.RetryPolicy.ExecuteActionR
at Microsoft.Data.Tools.Schema.Common.SqlClient.RetryPolicy.ExecuteAction(Action1 action, Nullable1 token)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.Export.ExportTablePartHelper.ExportTablePart()
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.Export.ExportTableHelper.ExportTablePart(TablePartMetadata tablePartMetadata)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.Export.ExportTableHelper.<>c__DisplayClass4.<StartExportTablePart>b__3()
at Microsoft.Data.Tools.Schema.Sql.Dac.Logging.DacLogContext.<>c__DisplayClass1.<AddContext>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 32,886 Reputation points MVP
    2021-10-01T10:41:27.773+00:00

    My suggestion use Data Migration Assistant (DMA) tool instead of using SSMS. It performs an assessment of your database and also perform a migration for you of multiple tables in parallel.

    Perform an assessment and you will find the reason behind that failed migration.


  2. Michael Gaihede 1 Reputation point
    2021-10-06T07:19:14.887+00:00

    There is still no solution unfortunately. We've reported the problem to Azure support, and as of yet no solution from them either, but thanks

    0 comments No comments