question

MichaelGaihede-3954 avatar image
0 Votes"
MichaelGaihede-3954 asked MichaelGaihede-3954 answered

SQL Server to Azure deployment problem

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.<>cDisplayClass67.<CreateExportOperation>b63()
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(Func`1 streamGetter, String databaseName, DacExportOptions exportOptions, IEnumerable`1 tables, CancellationToken cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.ExportBacpac(String packageFileName, String databaseName, DacExportOptions options, IEnumerable`1 tables, Nullable`1 cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.ExportBacpac(String packageFileName, String databaseName, DacSchemaModelStorageType modelStorageType, IEnumerable`1 tables, Nullable`1 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(List`1 exportTableHelpers)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.ExportBacpacStep.ExportBatch(List`1 batch, ConnectionManager connectionManager)
at Microsoft.Data.Tools.Schema.Sql.Dac.Data.ExportDataStep.Execute(Boolean isAlwaysEncrypted)
at Microsoft.SqlServer.Dac.DacServices.<>c_DisplayClass65.<>cDisplayClass67.<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>b3(RetryState retryState)
at Microsoft.Data.Tools.Schema.Common.SqlClient.RetryPolicy.ExecuteAction[R](Func`2 func, Nullable`1 token)
at Microsoft.Data.Tools.Schema.Common.SqlClient.RetryPolicy.ExecuteAction(Action`1 action, Nullable`1 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>b3()
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
image.png (34.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MichaelGaihede-3954,
Thanks for using Microsoft Q&A !!
I suggest you to please create a support ticket for this issue. In case you have a limitation, please let me know and I will help providing a free support ticket for you.

Thanks
Saurabh

0 Votes 0 ·
AlbertoMorillo avatar image
0 Votes"
AlbertoMorillo answered SaurabhSharma-msft commented

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.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MichaelGaihede-3954,
We haven't heard back from you. Just wanted to check if you are you still facing the issue? In case If you already found a solution, would you please share it here with the community? Otherwise, let us know and we will continue to engage with you on the issue.

Thanks
Saurabh

0 Votes 0 ·
MichaelGaihede-3954 avatar image
0 Votes"
MichaelGaihede-3954 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.