Installing ASP.NET Membership services database in SQL Server 2008 R2

·

·

Create a new database with file group or as usual. Note that the below script is using file group as an example.

USE [master]

GO

/****** Object:  Database [FRATEPRD]    Script Date: 11/26/2012 10:17:57 ******/

CREATE

DATABASE [FRATEPRD] ON  PRIMARY

(

NAME = N’FRate’, FILENAME = N’C:\Database\FRATE-PRD\FRate.mdf’ , SIZE = 1623040KB , MAXSIZE = 2097152KB , FILEGROWTH = 102400KB ),

FILEGROUP [MASTERDATA]

(

NAME = N’MasterData.ndf’, FILENAME = N’C:\Database\FRATE-PRD\MasterData.ndf’ , SIZE = 138240KB , MAXSIZE = UNLIMITED, FILEGROWTH = 5120KB )

LOG ON

(

NAME = N’FRate_log’, FILENAME = N’C:\Database\FRATE-PRD\FRate_log.ldf’ , SIZE = 833024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)

GO

ALTER DATABASE [FRATEPRD] SET COMPATIBILITY_LEVEL = 100

GO

IF

(1 = FULLTEXTSERVICEPROPERTY(‘IsFullTextInstalled’))

begin

EXEC [FRATEPRD].[dbo].[sp_fulltext_database] @action = ‘enable’

end

GO

ALTER DATABASE [FRATEPRD] SET ANSI_NULL_DEFAULT OFF

GO

ALTER DATABASE [FRATEPRD] SET ANSI_NULLS OFF

GO

ALTER DATABASE [FRATEPRD] SET ANSI_PADDING OFF

GO

ALTER DATABASE [FRATEPRD] SET ANSI_WARNINGS OFF

GO

ALTER DATABASE [FRATEPRD] SET ARITHABORT OFF

GO

ALTER DATABASE [FRATEPRD] SET AUTO_CLOSE OFF

GO

ALTER DATABASE [FRATEPRD] SET AUTO_CREATE_STATISTICS ON

GO

ALTER DATABASE [FRATEPRD] SET AUTO_SHRINK OFF

GO

ALTER DATABASE [FRATEPRD] SET AUTO_UPDATE_STATISTICS ON

GO

ALTER DATABASE [FRATEPRD] SET CURSOR_CLOSE_ON_COMMIT OFF

GO

ALTER DATABASE [FRATEPRD] SET CURSOR_DEFAULT  GLOBAL

GO

ALTER DATABASE [FRATEPRD] SET CONCAT_NULL_YIELDS_NULL OFF

GO

ALTER DATABASE [FRATEPRD] SET NUMERIC_ROUNDABORT OFF

GO

ALTER DATABASE [FRATEPRD] SET QUOTED_IDENTIFIER OFF

GO

ALTER DATABASE [FRATEPRD] SET RECURSIVE_TRIGGERS OFF

GO

ALTER DATABASE [FRATEPRD] SET  DISABLE_BROKER

GO

ALTER DATABASE [FRATEPRD] SET AUTO_UPDATE_STATISTICS_ASYNC OFF

GO

ALTER DATABASE [FRATEPRD] SET DATE_CORRELATION_OPTIMIZATION OFF

GO

ALTER DATABASE [FRATEPRD] SET TRUSTWORTHY OFF

GO

ALTER DATABASE [FRATEPRD] SET ALLOW_SNAPSHOT_ISOLATION OFF

GO

ALTER DATABASE [FRATEPRD] SET PARAMETERIZATION SIMPLE

GO

ALTER DATABASE [FRATEPRD] SET READ_COMMITTED_SNAPSHOT OFF

GO

ALTER DATABASE [FRATEPRD] SET HONOR_BROKER_PRIORITY OFF

GO

ALTER DATABASE [FRATEPRD] SET  READ_WRITE

GO

ALTER DATABASE [FRATEPRD] SET RECOVERY SIMPLE

GO

ALTER DATABASE [FRATEPRD] SET  MULTI_USER

GO

ALTER DATABASE [FRATEPRD] SET PAGE_VERIFY CHECKSUM 

GO

ALTER DATABASE [FRATEPRD] SET DB_CHAINING OFF

GO

Adding Asp.Net Membership to above database

Step 1: 1.Run aspnet_regsql.exe utility from C:\Windows\Microsoft.NET\Framework\v4.0.30319 folder on your machine. Selecting or double clicking the aspnet_regsql.exe utility opens the wizard as below.

Run aspnet_regsql.exe
Run aspnet_regsql.exe

Step 2:  Select configure SQL Server for application services radio button to install new database and select Next button.

Configure SQL Server for application services
Configure SQL Server for application services

Step 3:  Enter your SQL server name as <your Machine name \SQL Server> as shown below. Note that you can change the application services database name to your desired name (aspnetdb by default).

Enter your SQL server name
Enter your SQL server name

Step 4: Select Next button and confirm that your settings are correct to go further with installation (shown in below image) and select Next button.

Confirm your settings
Confirm your settings

Step 5: Selecting Next button on above window takes you to confirmation window as below after successful installation of your application services database for ASP.NET.

The database has been created
The database has been created

Step 6: Asp.Net Membership database has been created.

Sample created membership tables
Sample created membership tables


Leave a Reply

Your email address will not be published. Required fields are marked *