----------------------------------------------------------------
--                                                              
--  File:   CREATE_DATABASE.SQL                                 
--          Microsoft TPC-E Benchmark Kit Ver. 1.14.0-1031      
--          Copyright Microsoft, 2008-2015                  
--                                                              --
------------------------------------------------------------------

USE master
GO

--  create main database files
CREATE DATABASE tpce
ON PRIMARY
(	NAME		    = MSSQL_tpce_root,
	FILENAME	  = 'F:\MSSQL_tpce_root.mdf',
	SIZE		    = 8MB,
	FILEGROWTH	= 0)
LOG ON
(	NAME		    = MSSQL_tpce_log_A,
	FILENAME	  = 'F:\log.ldf',
	SIZE		    = 200MB,
	FILEGROWTH	= 0)
COLLATE Latin1_General_BIN
GO

--LOG ON
--(   NAME        = MSSQL_tpce_log,
--    FILENAME    = 'I:\TPCE_Data\tpce_log.ldf',
--    SIZE        = 200MB,
--    FILEGROWTH  = 500MB,
--    MAXSIZE     = 270000MB)
--COLLATE Latin1_General_100_BIN2
--GO

ALTER DATABASE tpce ADD FILEGROUP fixed_fg
GO

ALTER DATABASE tpce ADD FILE
(	NAME		= Fixed1,
	FILENAME	= 'c:\mp\fx1\',
	SIZE		= 183400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed2,
	FILENAME	= 'c:\mp\fx2\',
	SIZE		= 183400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed3,
	FILENAME	= 'c:\mp\fx3\',
	SIZE		= 183400MB,
	FILEGROWTH	= 0)	
TO FILEGROUP fixed_fg
GO


ALTER DATABASE tpce ADD FILEGROUP growing_fg
GO

ALTER DATABASE tpce ADD FILE
(	NAME		= Growing1,
	FILENAME	= 'c:\mp\gw1\',
	SIZE		= 8750100MB,
	FILEGROWTH	= 0),
(	NAME		= Growing2,
	FILENAME	= 'c:\mp\gw2\',
	SIZE		= 8750100MB,
	FILEGROWTH	= 0),
(	NAME		= Growing3,
	FILENAME	= 'c:\mp\gw3\',
	SIZE		= 8750100MB,
	FILEGROWTH	= 0)
TO FILEGROUP growing_fg
GO

ALTER DATABASE tpce ADD LOG FILE
(	NAME		    = MSSQL_tpce_log,
	FILENAME	  = 'E:',
	SIZE		    = 1050000MB,
	FILEGROWTH	= 0)
GO