SQL Server Migration Failing

From Hrvoje Hudo @hhrvoje via Twitter

Why are my attempts to export DB from stand-alone SQL server into Azure SQL failing?

Original Tweet:

Exporting db from stand-alone SQL Server into @Azure Sql is much much more challenging than I expected to be, so far all attempts failed


July 4th, 2015 1:06pm

From Hrvoje Hudo @hhrvoje via Twitter

Why are my attempts to export DB from stand-alone SQL server into Azure SQL failing?

Original Tweet:

Exporting db from stand-alone SQL Server into @Azure Sql is much much more challenging than I expected to be, so far all attempts failed

Little bit of background:

- current db is stand-alone sql server 2014. Created by EF 6 migrations. No SPs, Views, just simple tables with data
- SQL pub wizard can't script data, reports "cyclic redundancy check error". But if I script schema+data, then it works. Generated file is around 200Mb, and VS2013 (all latest updates) just hangs if I try to execute it against Azure db
- Azure migration wizard tool stops on one table, reports this error from screenshot.


I was able to find an error with this Sql line:

CREATE TABLE [dbo].[Offers](
 [UniqueIntId] [bigint]  NOT NULL CONSTRAINT [SQ_OfferUniqueIntIdSequence]  DEFAULT (NEXT VALUE FOR [OfferUniqueIntIdSequence]),

it fails with message: Invalid object name 'OfferUniqueIntIdSequence'.

This CREATE script is generated with sql pub wiz, configured for azure db.


Free Windows Admin Tool Kit Click here and download it now
July 4th, 2015 1:29pm

I was able to find an error with this Sql line:

CREATE TABLE [dbo].[Offers](
 [UniqueIntId] [bigint]  NOT NULL CONSTRAINT [SQ_OfferUniqueIntIdSequence]  DEFAULT (NEXT VALUE FOR [OfferUniqueIntIdSequence]),

it fails with message: Invalid object name 'OfferUniqueIntIdSequence'.

This CREATE script is generated with sql pub wiz, configured for azure db.


  • Edited by hhrvojeMVP Saturday, July 04, 2015 1:39 PM
July 4th, 2015 1:38pm

I removed that CONSTRAINT and I was able to create db. Why it doesn't work with it?

Also, in Azure portal, I could see db card, and now it shows just this, or endless "Loading..." animation:

Old portal gives this error when opened "Monitor" tab of this database:

The server could not retrieve metrics (Internal Server Error).

  • Edited by hhrvojeMVP Saturday, July 04, 2015 3:05 PM
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2015 3:02pm

Im using latest update, v12, so this sequence should work, right? 
I created CREATE Sql in mssqlms, with sql pub wiz configured for azure, tried to exec that sql in azure, and it fails with the same "constrainterror

Also, when I created new db at s0/s1 perf level, and did quick perf testing, the whole application (hosted in web app role) just stopped working. I couldn't get any metrics in portal, and app would timeout on db connection. After minute or two, app worked fine but couldn't see metrics, ever again. I deleted db, created new one again, at S2 level, and its working fine now, even though I dont know what will happen if i run my perf test again!

Im on Bizspark subscription, and i think I can create only billing ticket, not the technical one (need to pay for that one). Suggestions?

What happens after db reaches DTU limit? If I send 1000 request in minute, will they be throttled to, let say, 200 req/min, or it will reject/fail everything above some limit?

 

July 6th, 2015 6:45am

Yeah any technical support you need to pay which is a bit disappointing with Microsoft.

S0/S1 are very limited, prior to SQL V12 the RESOURCE_GOVERNOR (internal SQL process) would kill connections that caused any high activity.

Depending what transactions you are doing stick with S2 (downgrade to S0/S1 if your application doesn't need high performance outside business hours for example).  

Make sure your database is tuned correctly, correct indexes, etc. 

You can get connection errors when you start reaching the DTU threshold.

Yes, the CREATE SEQUENCE statement should work in V12. This statement should exist before the CREATE TABLE statement, try and create them in mssqlms first. 

Free Windows Admin Tool Kit Click here and download it now
July 6th, 2015 6:11pm

hhrvoje,

As Ron said,  CREATE SEQUENCE is supported for V12 databases.

You can find an overview of resource management https://msdn.microsoft.com/en-us/library/azure/dn338083.aspx

and you can also find an overview of the database editions https://msdn.microsoft.com/en-us/library/azure/dn741336.aspx

If you could email me at cakarst at Microsoft dot com with your subscriptionGUID and servername, I will be able to help get the portal metrics issue resolved.

Thanks,

Casey

July 6th, 2015 7:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics