text: USE [master]
  GO
  /****** Object:  Database [MailPhishing]    Script Date: 6/22/2015 12:15:27 PM ******/
  
  CREATE DATABASE [MailPhishing] ON  PRIMARY 
  ( NAME = N'MailPhishing', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MailPhishing.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
   LOG ON 
  ( NAME = N'MailPhishing_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MailPhishing_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
  GO
  ALTER DATABASE [MailPhishing] SET COMPATIBILITY_LEVEL = 100
  GO
  IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
  begin
  EXEC [MailPhishing].[dbo].[sp_fulltext_database] @action = 'enable'
  end
  GO
  ALTER DATABASE [MailPhishing] SET ANSI_NULL_DEFAULT OFF 
  GO
  ALTER DATABASE [MailPhishing] SET ANSI_NULLS OFF 
  GO
  ALTER DATABASE [MailPhishing] SET ANSI_PADDING OFF 
  GO
  ALTER DATABASE [MailPhishing] SET ANSI_WARNINGS OFF 
  GO
  ALTER DATABASE [MailPhishing] SET ARITHABORT OFF 
  GO
  ALTER DATABASE [MailPhishing] SET AUTO_CLOSE OFF 
  GO
  ALTER DATABASE [MailPhishing] SET AUTO_CREATE_STATISTICS ON 
  GO
  ALTER DATABASE [MailPhishing] SET AUTO_SHRINK OFF 
  GO
  ALTER DATABASE [MailPhishing] SET AUTO_UPDATE_STATISTICS ON 
  GO
  ALTER DATABASE [MailPhishing] SET CURSOR_CLOSE_ON_COMMIT OFF 
  GO
  ALTER DATABASE [MailPhishing] SET CURSOR_DEFAULT  GLOBAL 
  GO
  ALTER DATABASE [MailPhishing] SET CONCAT_NULL_YIELDS_NULL OFF 
  GO
  ALTER DATABASE [MailPhishing] SET NUMERIC_ROUNDABORT OFF 
  GO
  ALTER DATABASE [MailPhishing] SET QUOTED_IDENTIFIER OFF 
  GO
  ALTER DATABASE [MailPhishing] SET RECURSIVE_TRIGGERS OFF 
  GO
  ALTER DATABASE [MailPhishing] SET  DISABLE_BROKER 
  GO
  ALTER DATABASE [MailPhishing] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
  GO
  ALTER DATABASE [MailPhishing] SET DATE_CORRELATION_OPTIMIZATION OFF 
  GO
  ALTER DATABASE [MailPhishing] SET TRUSTWORTHY OFF 
  GO
  ALTER DATABASE [MailPhishing] SET ALLOW_SNAPSHOT_ISOLATION OFF 
  GO
  ALTER DATABASE [MailPhishing] SET PARAMETERIZATION SIMPLE 
  GO
  ALTER DATABASE [MailPhishing] SET READ_COMMITTED_SNAPSHOT OFF 
  GO
  ALTER DATABASE [MailPhishing] SET HONOR_BROKER_PRIORITY OFF 
  GO
  ALTER DATABASE [MailPhishing] SET RECOVERY FULL 
  GO
  ALTER DATABASE [MailPhishing] SET  MULTI_USER 
  GO
  ALTER DATABASE [MailPhishing] SET PAGE_VERIFY CHECKSUM  
  GO
  ALTER DATABASE [MailPhishing] SET DB_CHAINING OFF 
  GO
  USE [MailPhishing]
  GO
  
  /****** Object:  User [CCCLAB\rndadmin]    Script Date: 6/22/2015 12:15:27 PM ******/
  
  CREATE USER [CCCLAB\rndadmin] FOR LOGIN [CCCLAB\rndadmin] WITH DEFAULT_SCHEMA=[dbo]
  GO
  ALTER ROLE [db_owner] ADD MEMBER [CCCLAB\rndadmin]
  GO
  ALTER ROLE [db_accessadmin] ADD MEMBER [CCCLAB\rndadmin]
  GO
  ALTER ROLE [db_securityadmin] ADD MEMBER [CCCLAB\rndadmin]
  GO
  ALTER ROLE [db_ddladmin] ADD MEMBER [CCCLAB\rndadmin]
  GO
  ALTER ROLE [db_backupoperator] ADD MEMBER [CCCLAB\rndadmin]
  GO
  ALTER ROLE [db_datareader] ADD MEMBER [CCCLAB\rndadmin]
  GO
  ALTER ROLE [db_datawriter] ADD MEMBER [CCCLAB\rndadmin]
  GO
  ALTER ROLE [db_denydatareader] ADD MEMBER [CCCLAB\rndadmin]
  GO
  ALTER ROLE [db_denydatawriter] ADD MEMBER [CCCLAB\rndadmin]
  GO
  /****** Object:  Table [dbo].[MailTemplates]    Script Date: 6/22/2015 12:15:27 PM ******/
  
  SET ANSI_NULLS ON
  GO
  
  SET QUOTED_IDENTIFIER ON
  GO
  
  CREATE TABLE [dbo].[MailTemplates](
  	[Id] [int] IDENTITY(1,1) NOT NULL,
  	[MailSubject] [nvarchar](255) NOT NULL,
  	[MailBody] [text] NOT NULL,
  	[EscapeSemicolons] [nvarchar](1) NOT NULL
  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  
  GO
  ALTER TABLE [dbo].[MailTemplates] ADD  CONSTRAINT [DF_MailTemplates_EscapeSemicolons]  DEFAULT (N'N') FOR [EscapeSemicolons]
  GO
  
  USE [master]
  GO
  
  ALTER DATABASE [MailPhishing] SET  READ_WRITE 
  GO
  