6

I am trying to migrate a database from SQL Server 2008 to SQL Azure. The database that I am attempting to migrate includes the ASP.NET Membership database (http://www.asp.net/web-forms/tutorials/moving-to-aspnet-20/membership). This database works fine when I run it in my SQL Server 2008 database. However, when I try to authenticate a user against SQL Azure, I receive an error that says:

"Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered index and try again."

However, I'm not sure what to do. When I try to update the index on the aspnet_Applications table, I receive a foreign key problem. I am using the following in an attempt to migrate my non-clustered index to a clustered index:

ALTER TABLE aspnet_Applications
DROP CONSTRAINT PK__aspnet_A__SOMEID

ALTER TABLE aspnet_Applications
ADD CONSTRAINT PK__aspnet_A__SOMEID PRIMARY KEY CLUSTERED(ApplicationId)

Can someone please help me overcome this issue? Thank you!

1
  • upgrade your server to SQL DB V12 which support heaps, and it is much closer to SQL stand alone compared to V11. Commented Sep 5, 2015 at 5:42

3 Answers 3

5

I had problems with the ASP.NET membership provider tables (non clustered indexes) and missing the "WITH (NOLOCK)" statement on the stored procedure aspnet_Membership_GetNumberOfUsersOnline etc.

The migration tool found here fixed the problems and exported the database to Azure.

http://sqlazuremw.codeplex.com/

It is a nice wizard that connects to your existing SQL Server and migrate the selected database to Azure.

Sign up to request clarification or add additional context in comments.

2 Comments

This SQL Azure Migration Wizard made this so easy, and fixed all of the issues with aspnet_Membership seamlessly. Great stuff.
This worked for me in Windows 10 by downloading the v5.15.6 Release.
2

If you can, try to use the ASP.NET Universal Providers For SqlExpress 1.1 (I wish they'd change the name as it is a bit of a misnomer). This is the officially supported method of enabling the SQL membership, role and session providers across both SQL Azure and standalone SQL Server.

Here are a couple of other links for reference:

Scott Hanselman - Introducing System.Web.Providers

SQL Azure Team Blog - Using SQL Azure for Session State

2 Comments

SQL Azure now supports heaps on V12 servers, so this should no longer be an issue. msdn.microsoft.com/library/…
second link now broken but the blog can be found here azure.microsoft.com/en-us/blog/…
1

SQL Azure is not the same as SQL Server because not all features are supported. There is a special SQL Azure Membership Script to create the database.

See here: http://support.microsoft.com/kb/2006191/de

I hope this helps.

Greetings.

3 Comments

thanks, that really helped me where the chosen answer did not.
The Membership provider is deprecated therefore the script won't work any more. But there is a new Membership implementation. Take a look at this: aaron-hoffman.blogspot.de/2013_02_01_archive.html
@MUG4N link dead also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.