Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i run aspnet_regsql on sql azure? [duplicate]

Possible Duplicate:
Migrating ASP.NET Membership Database to SQL Azure

How do I run aspnet_regsql on sql azure database? I made it work the hard way, by exporting all db objects over. However, I seriously believe that there's an easier way. Please help.

like image 370
Romeo Avatar asked Jun 22 '12 14:06

Romeo


2 Answers

When you run aspnet_regsql on sql azure database, the error occurs only because SQL Azure does not support the USE statement to switch database contexts when it executes commands against SQL Azure databases.

To work around this, Microsoft created a hotfix. The following steps show you how to use the tool that is provided by the hotfix.

  1. Download the aspnet_regsqlazure.zip file from the hotfix page.
  2. Extract the contents of the file to a location on your local hard drive.
  3. Open a command prompt and navigate to the directory where you extracted the files.

Use the following command line to execute the tool (substitute your server name, database name, logon, and password where appropriate).

aspnet_regsqlazure -s [your server name].database.windows.net -d [your database name] -u [your user name]@[your server name] -p [your password] -a mr
like image 156
AvkashChauhan Avatar answered Sep 21 '22 23:09

AvkashChauhan


Membership Provider generated by aspnet_regsql.exe is out dated.

Please use new Universal Providers which is Azure compatible.

Update - 7/23/2015

Microsoft has new membership called Identity. Current version is 2 as of this writing.

like image 35
Win Avatar answered Sep 22 '22 23:09

Win