USE [master]
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = N'PLSSUG_DEMO1')
DROP DATABASE [PLSSUG_DEMO1]
GO

CREATE DATABASE [PLSSUG_DEMO1]
ON PRIMARY (
	NAME		= N'PLSSUG_DEMO1',
	FILENAME	= N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\PLSSUG_DEMO1.mdf',
	SIZE		= 102400KB,
	FILEGROWTH	= 51200KB,
	MAXSIZE		= UNLIMITED
),
/*
FILEGROUP [MEMORY_FG] CONTAINS MEMORY_OPTIMIZED_DATA DEFAULT (
	NAME		= N'MEMORY_DATA',
	FILENAME	= N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\MEMORY_DATA',
	MAXSIZE		= UNLIMITED
),
*/
FILEGROUP [FS_DOCS] CONTAINS FILESTREAM DEFAULT (
	NAME		= N'FS_DOCS1',
	FILENAME	= N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\FS_DOCS1',
	MAXSIZE		= UNLIMITED),
FILEGROUP [FS_IMAGES] CONTAINS FILESTREAM (
	NAME		= N'FS_IMAGES1',
	FILENAME	= N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\FS_IMAGES1',
	MAXSIZE		= UNLIMITED
)
LOG ON (
	NAME		= N'PLSSUG_DEMO1_log',
	FILENAME	= N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\PLSSUG_DEMO1_log.ldf',
	SIZE		= 51200KB,
	FILEGROWTH	= 20480KB
)
GO

ALTER DATABASE [PLSSUG_DEMO1] SET RECOVERY FULL 
GO

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

