Thursday, September 8, 2011

How can I install membership schema in my existing database?

Installing membership related schema to an existing database is very easy task. SQL Server Registration Tool(aspnet_regsql.exe) provides a very easy way to achieve the goal. We can run the registration tool from from Visual Studio Command Prompt or we can navigate to aspnet_regsql.exe file location and run the file.

To run from command prompt navigate to:
Start Menu> Microsoft Visual Studio 2010> Visual Studio Tools>Visual Studio Command Prompt(2010)
In the command prompt write aspnet_regsql command and press enter key as the screen shows.

To run from aspnet_regsql.exe  file location navigate to:
%Windows%\Microsoft.NET\Framework\v4.0.30319 and double click on aspnet_regsql.exe to run the tool.

ASP.NET SQL Server Setup Wizard will be appeared as follows:

Press Next button and you will get following screen:

On the next screen you will be prompted to select the database with credentials to which you want to setup membership.

Click Next to confirm your settings and click next again to execute the wizard and finally membership schema will be created on your database.

If you are interested to know more on membership you can navigate here:
Examining ASP.NET's Membership, Roles, and Profile



  1. how do you do this in a hosting env, or integrate the script into your db file?

  2. you can customize membership or diff /copy it with sql commander