----------------------------------------------------------------
--                                                              
--  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		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed2,
	FILENAME	= 'c:\mp\fx2\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed3,
	FILENAME	= 'c:\mp\fx3\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed4,
	FILENAME	= 'c:\mp\fx4\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed5,
	FILENAME	= 'c:\mp\fx5\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed6,
	FILENAME	= 'c:\mp\fx6\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed7,
	FILENAME	= 'c:\mp\fx7\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed8,
	FILENAME	= 'c:\mp\fx8\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed9,
	FILENAME	= 'c:\mp\fx9\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed10,
	FILENAME	= 'c:\mp\fx10\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed11,
	FILENAME	= 'c:\mp\fx11\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed12,
	FILENAME	= 'c:\mp\fx12\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed13,
	FILENAME	= 'c:\mp\fx13\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed14,
	FILENAME	= 'c:\mp\fx14\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed15,
	FILENAME	= 'c:\mp\fx15\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed16,
	FILENAME	= 'c:\mp\fx16\',
	SIZE		= 70400MB,
     FILEGROWTH	= 0),
(	NAME		= Fixed17,
	FILENAME	= 'c:\mp\fx17\',
	SIZE		= 70400MB,
	FILEGROWTH	= 0),
(	NAME		= Fixed18,
	FILENAME	= 'c:\mp\fx18\',
	SIZE		= 70400MB,
	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		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing2,
	FILENAME	= 'c:\mp\gw2\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing3,
	FILENAME	= 'c:\mp\gw3\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing4,
	FILENAME	= 'c:\mp\gw4\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing5,
	FILENAME	= 'c:\mp\gw5\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing6,
	FILENAME	= 'c:\mp\gw6\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing7,
	FILENAME	= 'c:\mp\gw7\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing8,
	FILENAME	= 'c:\mp\gw8\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing9,
	FILENAME	= 'c:\mp\gw9\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing10,
	FILENAME	= 'c:\mp\gw10\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing11,
	FILENAME	= 'c:\mp\gw11\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing12,
	FILENAME	= 'c:\mp\gw12\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing13,
	FILENAME	= 'c:\mp\gw13\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing14,
	FILENAME	= 'c:\mp\gw14\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing15,
	FILENAME	= 'c:\mp\gw15\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing16,
	FILENAME	= 'c:\mp\gw16\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing17,
	FILENAME	= 'c:\mp\gw17\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0),
(	NAME		= Growing18,
	FILENAME	= 'c:\mp\gw18\',
	SIZE		= 3354300MB,
	FILEGROWTH	= 0)
TO FILEGROUP growing_fg
GO

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