USE [master]
GO

/****** Object:  Database [TestDb]    Script Date: 21/06/2016 07:38:14 ******/
CREATE DATABASE [TestDb]
 CONTAINMENT = NONE
 ON  PRIMARY 
( NAME = N'TestDb', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\TestDb.mdf' , SIZE = 4288KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'TestDb_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\TestDb_log.ldf' , SIZE = 1072KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO

ALTER DATABASE [TestDb] SET COMPATIBILITY_LEVEL = 120
GO

ALTER DATABASE [TestDb] SET ANSI_NULL_DEFAULT OFF 
GO

ALTER DATABASE [TestDb] SET ANSI_NULLS OFF 
GO

ALTER DATABASE [TestDb] SET ANSI_PADDING OFF 
GO

ALTER DATABASE [TestDb] SET ANSI_WARNINGS OFF 
GO

ALTER DATABASE [TestDb] SET ARITHABORT OFF 
GO

ALTER DATABASE [TestDb] SET AUTO_CLOSE OFF 
GO

ALTER DATABASE [TestDb] SET AUTO_SHRINK OFF 
GO

ALTER DATABASE [TestDb] SET AUTO_UPDATE_STATISTICS ON 
GO

ALTER DATABASE [TestDb] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO

ALTER DATABASE [TestDb] SET CURSOR_DEFAULT  GLOBAL 
GO

ALTER DATABASE [TestDb] SET CONCAT_NULL_YIELDS_NULL OFF 
GO

ALTER DATABASE [TestDb] SET NUMERIC_ROUNDABORT OFF 
GO

ALTER DATABASE [TestDb] SET QUOTED_IDENTIFIER OFF 
GO

ALTER DATABASE [TestDb] SET RECURSIVE_TRIGGERS OFF 
GO

ALTER DATABASE [TestDb] SET  ENABLE_BROKER 
GO

ALTER DATABASE [TestDb] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO

ALTER DATABASE [TestDb] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO

ALTER DATABASE [TestDb] SET TRUSTWORTHY OFF 
GO

ALTER DATABASE [TestDb] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO

ALTER DATABASE [TestDb] SET PARAMETERIZATION SIMPLE 
GO

ALTER DATABASE [TestDb] SET READ_COMMITTED_SNAPSHOT OFF 
GO

ALTER DATABASE [TestDb] SET HONOR_BROKER_PRIORITY OFF 
GO

ALTER DATABASE [TestDb] SET RECOVERY SIMPLE 
GO

ALTER DATABASE [TestDb] SET  MULTI_USER 
GO

ALTER DATABASE [TestDb] SET PAGE_VERIFY CHECKSUM  
GO

ALTER DATABASE [TestDb] SET DB_CHAINING OFF 
GO

ALTER DATABASE [TestDb] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF ) 
GO

ALTER DATABASE [TestDb] SET TARGET_RECOVERY_TIME = 0 SECONDS 
GO

ALTER DATABASE [TestDb] SET DELAYED_DURABILITY = DISABLED 
GO

ALTER DATABASE [TestDb] SET  READ_WRITE 
GO

USE master;  
GO  
CREATE DATABASE FileStreamDB  
ON PRIMARY   
    (  
    NAME = FileStreamDB_data   
    ,FILENAME = ''  
    ,SIZE = 10MB  
    ,MAXSIZE = 50MB  
    ,FILEGROWTH = 15%  
    ),  
FILEGROUP FileStreamPhotos CONTAINS FILESTREAM DEFAULT  
    (  
    NAME = FSPhotos  
    ,FILENAME = 'C:\MyFSfolderPhotos' 
, MAXSIZE = 5000 MB  
    ),  
    (  
      NAME = FSPhotos2  
      , FILENAME = 'D:\MyFSfolderPhotos'  
      , MAXSIZE = 10000 MB  
     ),  
FILEGROUP FileStreamResumes CONTAINS FILESTREAM  
    (  
    NAME = FileStreamResumes  
    ,FILENAME = 'C:\MyFSfolderResumes'
    ) 
LOG ON  
    (  
    NAME = FileStream_log  
    ,FILENAME = 'FileStreamDB_log.ldf'
    ,SIZE = 5MB  
    ,MAXSIZE = 25MB  
    ,FILEGROWTH = 5MB  
    )
GO  
