Creating the database
The database is created using SQL files that are in the Discover\DataExtractor\Scripts
directory. The two SQL files are
CreateDB8x.sql
and CreateSchema8x.sql
.
CreateDB8x.sql
- creates the databases FileGroups.- The default database name is
TLWEB
. - The default location is
D:\DB
.Note: To change the database location, editCreateDB8x.sql
and change all occurrences ofD:\DB
to the preferred location.
- The default database name is
Default CreateDB8x.sql script
USE master;
if exists (select 1 from dbo.sysdatabases where name='TLWEB')
DROP DATABASE [TLWEB];
CREATE DATABASE [TLWEB]
ON PRIMARY( NAME = TLDATA_PRIMARY,
FILENAME = 'D:\DB\TLWEB_primary.mdf', SIZE = 20, FILEGROWTH = 5% ),
FILEGROUP TLDATA_SESN( NAME = TLDATA_SESN,
FILENAME = 'D:\DB\TLWEB_SESN.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLDATA_HIT( NAME = TLDATA_HIT,
FILENAME = 'D:\DB\TLWEB_HIT.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLDATA_APPD( NAME = TLDATA_APPD,
FILENAME = 'D:\DB\TLWEB_APPD.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLDATA_FACT( NAME = TLDATA_FACT,
FILENAME = 'D:\DB\TLWEB_FACT.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLDATA_COOK( NAME = TLDATA_COOK,
FILENAME = 'D:\DB\TLWEB_COOK.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLDATA_EVNT( NAME = TLDATA_EVNT,
FILENAME = 'D:\DB\TLWEB_EVNT.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLDATA_ATTR( NAME = TLDATA_ATTR,
FILENAME = 'C:\DB\TLWEB_ATTR.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLIDX_SESN( NAME = TLIDX_SESN,
FILENAME = 'D:\DB\TLIDX_SESN.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLIDX_HIT( NAME = TLIDX_HIT,
FILENAME = 'D:\DB\TLIDX_HIT.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLIDX_APPD( NAME = TLIDX_APPD,
FILENAME = 'D:\DB\TLIDX_APPD.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLIDX_FACT( NAME = TLIDX_FACT,
FILENAME = 'D:\DB\TLIDX_FACT.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLIDX_COOK( NAME = TLIDX_COOK,
FILENAME = 'D:\DB\TLIDX_COOK.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLIDX_EVNT( NAME = TLIDX_EVNT,
FILENAME = 'D:\DB\TLIDX_EVNT.mdf', SIZE = 50, FILEGROWTH = 20% ),
FILEGROUP TLIDX_ATTR( NAME = TLIDX_ATTR,
FILENAME = 'C:\DB\TLIDX_ATTR.mdf', SIZE = 50, FILEGROWTH = 20% )
LOG ON( NAME = 'TLDATA_LOG',
FILENAME = 'D:\DB\TLWEB_log.ldf', SIZE = 5, FILEGROWTH = 5 );
ALTER DATABASE [TLWEB] SET RECOVERY SIMPLE;