1、
2、
1、
USE [master]
GO
/****** Object: Database [MSPetShop4Services] Script Date: 2020/4/13 21:39:08 ******/
CREATE DATABASE [MSPetShop4Services]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N‘MSPetShop4Services‘, FILENAME = N‘C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\MSPetShop4Services.mdf‘ , SIZE = 4288KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N‘MSPetShop4Services_log‘, FILENAME = N‘C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\MSPetShop4Services_log.ldf‘ , SIZE = 1072KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [MSPetShop4Services] SET COMPATIBILITY_LEVEL = 120
GO
IF (1 = FULLTEXTSERVICEPROPERTY(‘IsFullTextInstalled‘))
begin
EXEC [MSPetShop4Services].[dbo].[sp_fulltext_database] @action = ‘enable‘
end
GO
ALTER DATABASE [MSPetShop4Services] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [MSPetShop4Services] SET ANSI_NULLS OFF
GO
ALTER DATABASE [MSPetShop4Services] SET ANSI_PADDING OFF
GO
ALTER DATABASE [MSPetShop4Services] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [MSPetShop4Services] SET ARITHABORT OFF
GO
ALTER DATABASE [MSPetShop4Services] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [MSPetShop4Services] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [MSPetShop4Services] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [MSPetShop4Services] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [MSPetShop4Services] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [MSPetShop4Services] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [MSPetShop4Services] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [MSPetShop4Services] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [MSPetShop4Services] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [MSPetShop4Services] SET ENABLE_BROKER
GO
ALTER DATABASE [MSPetShop4Services] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [MSPetShop4Services] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [MSPetShop4Services] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [MSPetShop4Services] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [MSPetShop4Services] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [MSPetShop4Services] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [MSPetShop4Services] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [MSPetShop4Services] SET RECOVERY FULL
GO
ALTER DATABASE [MSPetShop4Services] SET MULTI_USER
GO
ALTER DATABASE [MSPetShop4Services] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [MSPetShop4Services] SET DB_CHAINING OFF
GO
ALTER DATABASE [MSPetShop4Services] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [MSPetShop4Services] SET TARGET_RECOVERY_TIME = 0 SECONDS
GO
ALTER DATABASE [MSPetShop4Services] SET DELAYED_DURABILITY = DISABLED
GO
EXEC sys.sp_db_vardecimal_storage_format N‘MSPetShop4Services‘, N‘ON‘
GO
USE [MSPetShop4Services]
GO
/****** Object: User [mspetshop] Script Date: 2020/4/13 21:39:09 ******/
CREATE USER [mspetshop] FOR LOGIN [mspetshop] WITH DEFAULT_SCHEMA=[mspetshop]
GO
/****** Object: DatabaseRole [aspnet_WebEvent_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_WebEvent_FullAccess]
GO
/****** Object: DatabaseRole [aspnet_Roles_ReportingAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Roles_ReportingAccess]
GO
/****** Object: DatabaseRole [aspnet_Roles_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Roles_FullAccess]
GO
/****** Object: DatabaseRole [aspnet_Roles_BasicAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Roles_BasicAccess]
GO
/****** Object: DatabaseRole [aspnet_Profile_ReportingAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Profile_ReportingAccess]
GO
/****** Object: DatabaseRole [aspnet_Profile_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Profile_FullAccess]
GO
/****** Object: DatabaseRole [aspnet_Profile_BasicAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Profile_BasicAccess]
GO
/****** Object: DatabaseRole [aspnet_Personalization_ReportingAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Personalization_ReportingAccess]
GO
/****** Object: DatabaseRole [aspnet_Personalization_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Personalization_FullAccess]
GO
/****** Object: DatabaseRole [aspnet_Personalization_BasicAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Personalization_BasicAccess]
GO
/****** Object: DatabaseRole [aspnet_Membership_ReportingAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Membership_ReportingAccess]
GO
/****** Object: DatabaseRole [aspnet_Membership_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Membership_FullAccess]
GO
/****** Object: DatabaseRole [aspnet_Membership_BasicAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE ROLE [aspnet_Membership_BasicAccess]
GO
ALTER ROLE [db_owner] ADD MEMBER [mspetshop]
GO
ALTER ROLE [aspnet_Roles_BasicAccess] ADD MEMBER [aspnet_Roles_FullAccess]
GO
ALTER ROLE [aspnet_Roles_ReportingAccess] ADD MEMBER [aspnet_Roles_FullAccess]
GO
ALTER ROLE [aspnet_Profile_BasicAccess] ADD MEMBER [aspnet_Profile_FullAccess]
GO
ALTER ROLE [aspnet_Profile_ReportingAccess] ADD MEMBER [aspnet_Profile_FullAccess]
GO
ALTER ROLE [aspnet_Personalization_BasicAccess] ADD MEMBER [aspnet_Personalization_FullAccess]
GO
ALTER ROLE [aspnet_Personalization_ReportingAccess] ADD MEMBER [aspnet_Personalization_FullAccess]
GO
ALTER ROLE [aspnet_Membership_BasicAccess] ADD MEMBER [aspnet_Membership_FullAccess]
GO
ALTER ROLE [aspnet_Membership_ReportingAccess] ADD MEMBER [aspnet_Membership_FullAccess]
GO
/****** Object: Schema [aspnet_Membership_BasicAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Membership_BasicAccess]
GO
/****** Object: Schema [aspnet_Membership_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Membership_FullAccess]
GO
/****** Object: Schema [aspnet_Membership_ReportingAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Membership_ReportingAccess]
GO
/****** Object: Schema [aspnet_Personalization_BasicAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Personalization_BasicAccess]
GO
/****** Object: Schema [aspnet_Personalization_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Personalization_FullAccess]
GO
/****** Object: Schema [aspnet_Personalization_ReportingAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Personalization_ReportingAccess]
GO
/****** Object: Schema [aspnet_Profile_BasicAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Profile_BasicAccess]
GO
/****** Object: Schema [aspnet_Profile_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Profile_FullAccess]
GO
/****** Object: Schema [aspnet_Profile_ReportingAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Profile_ReportingAccess]
GO
/****** Object: Schema [aspnet_Roles_BasicAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Roles_BasicAccess]
GO
/****** Object: Schema [aspnet_Roles_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Roles_FullAccess]
GO
/****** Object: Schema [aspnet_Roles_ReportingAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_Roles_ReportingAccess]
GO
/****** Object: Schema [aspnet_WebEvent_FullAccess] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [aspnet_WebEvent_FullAccess]
GO
/****** Object: Schema [mspetshop] Script Date: 2020/4/13 21:39:09 ******/
CREATE SCHEMA [mspetshop]
GO
/****** Object: Table [dbo].[aspnet_Applications] Script Date: 2020/4/13 21:39:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[aspnet_Applications](
[ApplicationName] [nvarchar](256) NOT NULL,
[LoweredApplicationName] [nvarchar](256) NOT NULL,
[ApplicationId] [uniqueidentifier] NOT NULL DEFAULT (newid()),
[Description] [nvarchar](256) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [aspnet_Applications_Index] Script Date: 2020/4/13 21:39:09 ******/
CREATE CLUSTERED INDEX [aspnet_Applications_Index] ON [dbo].[aspnet_Applications]
(
[LoweredApplicationName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[aspnet_Membership] Script Date: 2020/4/13 21:39:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[aspnet_Membership](
[ApplicationId] [uniqueidentifier] NOT NULL,
[UserId] [uniqueidentifier] NOT NULL,
[Password] [nvarchar](128) NOT NULL,
[PasswordFormat] [int] NOT NULL DEFAULT ((0)),
[PasswordSalt] [nvarchar](128) NOT NULL,
[MobilePIN] [nvarchar](16) NULL,
[Email] [nvarchar](256) NULL,
[LoweredEmail] [nvarchar](256) NULL,
[PasswordQuestion] [nvarchar](256) NULL,
[PasswordAnswer] [nvarchar](128) NULL,
[IsApproved] [bit] NOT NULL,
[IsLockedOut] [bit] NOT NULL,
[CreateDate] [datetime] NOT NULL,
[LastLoginDate] [datetime] NOT NULL,
[LastPasswordChangedDate] [datetime] NOT NULL,
[LastLockoutDate] [datetime] NOT NULL,
[FailedPasswordAttemptCount] [int] NOT NULL,
[FailedPasswordAttemptWindowStart] [datetime] NOT NULL,
[FailedPasswordAnswerAttemptCount] [int] NOT NULL,
[FailedPasswordAnswerAttemptWindowStart] [datetime] NOT NULL,
[Comment] [ntext] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [aspnet_Membership_index] Script Date: 2020/4/13 21:39:09 ******/
CREATE CLUSTERED INDEX [aspnet_Membership_index] ON [dbo].[aspnet_Membership]
(
[ApplicationId] ASC,
[LoweredEmail] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[aspnet_Paths] Script Date: 2020/4/13 21:39:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[aspnet_Paths](
[ApplicationId] [uniqueidentifier] NOT NULL,
[PathId] [uniqueidentifier] NOT NULL,
[Path] [nvarchar](256) NOT NULL,
[LoweredPath] [nvarchar](256) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [aspnet_Paths_index] Script Date: 2020/4/13 21:39:09 ******/
CREATE UNIQUE CLUSTERED INDEX [aspnet_Paths_index] ON [dbo].[aspnet_Paths]
(
[ApplicationId] ASC,
[LoweredPath] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[aspnet_PersonalizationAllUsers] Script Date: 2020/4/13 21:39:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[aspnet_PersonalizationAllUsers](
[PathId] [uniqueidentifier] NOT NULL,
[PageSettings] [image] NOT NULL,
[LastUpdatedDate] [datetime] NOT NULL,
PRIMARY KEY CLUSTERED
(
[PathId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[aspnet_PersonalizationPerUser] Script Date: 2020/4/13 21:39:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[aspnet_PersonalizationPerUser](
[Id] [uniqueidentifier] NOT NULL,
[PathId] [uniqueidentifier] NULL,
[UserId] [uniqueidentifier] NULL,
[PageSettings] [image] NOT NULL,
[LastUpdatedDate] [datetime] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Index [aspnet_PersonalizationPerUser_index1] Script Date: 2020/4/13 21:39:09 ******/
CREATE UNIQUE CLUSTERED INDEX [aspnet_PersonalizationPerUser_index1] ON [dbo].[aspnet_PersonalizationPerUser]
(
[PathId] ASC,
[UserId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Table [dbo].[aspnet_Profile] Script Date: 2020/4/13 21:39:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[aspnet_Profile](
[UserId] [uniqueidentifier] NOT NULL