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


Free Windows Admin Tool Kit Click here and download it now
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.


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
Free Windows Admin Tool Kit Click here and download it now
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
July 4th, 2015 3:02pm

Also, in old portal:

Free Windows Admin Tool Kit Click here and download it now
July 5th, 2015 7:23am

Now I tried to delete SQL database and server, and create new one from scratch. I get the same error, can't retrieve metrics!

Also, I did that in old portal. In the new one, I got an error saying something like "database creating error" ...

How is this possible, why I can't create simple empty database!!?? 

July 5th, 2015 8:16am

Hi Hrvoje,

Can you please try to create a .bacpac for the database using SSMS--

RightClickonDatabase --> Task --> Export Data tier application


It will generate a .bacpac file, upload that file to any container in Azure and then create a SQL Azure database by Importing that bacpac file.

http://blogs.msdn.com/b/brunoterkaly/archive/2013/09/26/how-to-export-an-on-premises-sql-server-database-to-windows-azure-storage.aspx


Thanks,

Hitesh

Free Windows Admin Tool Kit Click here and download it now
July 5th, 2015 10:52pm

Hi hhrvoje,

I understand that you are facing multiple issues, Ideally you should be able to create a empty database from the old portal (manage.windowsazure.com) ( NEW --> DataServices --> SQL Database ) and if you are not able to create an empty database from the old portal as well then please open a ticket with us and we shall help you create one and fix the problem as well but ideally it should work from portal.

For "can't retrieve metrics" error, please create a ticket as we will be collecting some information and traces to see why are you getting this error and we shall assist you to fix this.

Thanks,

Hitesh

July 6th, 2015 1:02am

Not all features are supported on SQL Azure from a Standard SQL database.   

From the initial post Sequence numbers are only supported in SQL Azure V12 (preview).

Also check you have a CREATE SEQUENCE statement before the create offers table. 


Free Windows Admin Tool Kit Click here and download it now
July 6th, 2015 2:31am

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

Other recent topics Other recent topics