CREATE DATABASE [test1]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'test1', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.BIOSTAR2\MSSQL\DATA\test1.mdf' , SIZE = 4096KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'test1_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.BIOSTAR2\MSSQL\DATA\test1_log.ldf' , SIZE = 1024KB , FILEGROWTH = 10%)
GO
ALTER DATABASE [test1] SET COMPATIBILITY_LEVEL = 120
GO
ALTER DATABASE [test1] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [test1] SET ANSI_NULLS OFF
GO
ALTER DATABASE [test1] SET ANSI_PADDING OFF
GO
ALTER DATABASE [test1] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [test1] SET ARITHABORT OFF
GO
ALTER DATABASE [test1] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [test1] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [test1] SET AUTO_CREATE_STATISTICS ON(INCREMENTAL = OFF)
GO
ALTER DATABASE [test1] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [test1] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [test1] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [test1] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [test1] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [test1] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [test1] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [test1] SET DISABLE_BROKER
GO
ALTER DATABASE [test1] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [test1] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [test1] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [test1] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [test1] SET READ_WRITE
GO
ALTER DATABASE [test1] SET RECOVERY SIMPLE
GO
ALTER DATABASE [test1] SET MULTI_USER
GO
ALTER DATABASE [test1] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [test1] SET TARGET_RECOVERY_TIME = 0 SECONDS
GO
ALTER DATABASE [test1] SET DELAYED_DURABILITY = DISABLED
GO
USE [test1]
GO
IF NOT EXISTS (SELECT name FROM sys.filegroups WHERE is_default=1 AND name = N'PRIMARY') ALTER DATABASE [test1] MODIFY FILEGROUP [PRIMARY] DEFAULT
GO