GO
/****** Object: Table [dbo].[Sum_UpdateHistory] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_UpdateHistory](
[UpdateId] [bigint] IDENTITY(1,1) NOT NULL,
[StartId] [bigint] NOT NULL,
[EndId] [bigint] NOT NULL,
[Table] [nvarchar](50) NOT NULL,
[Server] [nvarchar](256) NOT NULL,
[UpdateDateTime] [datetime] NOT NULL,
[Updated] [bit] NOT NULL,
CONSTRAINT [PK_Sum_UpdateHistory] PRIMARY KEY CLUSTERED
(
[UpdateId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_TrafficByMonth] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_TrafficByMonth](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[CountOfSentMessages] [bigint] NULL,
[CountOfReceivedMessages] [bigint] NULL,
[CountOfInternalSentMessages] [bigint] NULL,
[CountOfInternalReceivedMessages] [bigint] NULL,
[CountOfInternetSentMessages] [bigint] NULL,
[CountOfInternetReceivedMessages] [bigint] NULL,
[SizeOfSentMessages] [bigint] NULL,
[SizeOfReceivedMessages] [bigint] NULL,
[SizeOfInternalSentMessages] [bigint] NULL,
[SizeOfInternalReceivedMessages] [bigint] NULL,
[SizeOfInternetSentMessages] [bigint] NULL,
[SizeOfInternetReceivedMessages] [bigint] NULL,
[OriginationServerId] [int] NULL,
CONSTRAINT [PK_Primary_Sum_TrafficByMonth] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Server] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_TrafficByHour_2] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_TrafficByHour_2](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Day] [int] NOT NULL,
[Hour] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[CountOfSentMessages] [bigint] NULL,
[CountOfReceivedMessages] [bigint] NULL,
[CountOfInternalSentMessages] [bigint] NULL,
[CountOfInternalReceivedMessages] [bigint] NULL,
[CountOfInternetSentMessages] [bigint] NULL,
[CountOfInternetReceivedMessages] [bigint] NULL,
[SizeOfSentMessages] [bigint] NULL,
[SizeOfReceivedMessages] [bigint] NULL,
[SizeOfInternalSentMessages] [bigint] NULL,
[SizeOfInternalReceivedMessages] [bigint] NULL,
[SizeOfInternetSentMessages] [bigint] NULL,
[SizeOfInternetReceivedMessages] [bigint] NULL,
[OriginationServerId] [int] NULL,
CONSTRAINT [PK_Primary_Sum_TrafficByHour_2] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Day] ASC,
[Hour] ASC,
[Server] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_TrafficByHour] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_TrafficByHour](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Day] [int] NOT NULL,
[Hour] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[OriginationServerId] [int] NOT NULL,
[CountOfSentMessages] [bigint] NULL,
[CountOfReceivedMessages] [bigint] NULL,
[CountOfInternalSentMessages] [bigint] NULL,
[CountOfInternalReceivedMessages] [bigint] NULL,
[CountOfInternetSentMessages] [bigint] NULL,
[CountOfInternetReceivedMessages] [bigint] NULL,
[SizeOfSentMessages] [bigint] NULL,
[SizeOfReceivedMessages] [bigint] NULL,
[SizeOfInternalSentMessages] [bigint] NULL,
[SizeOfInternalReceivedMessages] [bigint] NULL,
[SizeOfInternetSentMessages] [bigint] NULL,
[SizeOfInternetReceivedMessages] [bigint] NULL,
CONSTRAINT [PK_Primary_Sum_TrafficByHour] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Day] ASC,
[Hour] ASC,
[Server] ASC,
[OriginationServerId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_TrafficByDay] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_TrafficByDay](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Day] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[CountOfSentMessages] [bigint] NULL,
[CountOfReceivedMessages] [bigint] NULL,
[CountOfInternalSentMessages] [bigint] NULL,
[CountOfInternalReceivedMessages] [bigint] NULL,
[CountOfInternetSentMessages] [bigint] NULL,
[CountOfInternetReceivedMessages] [bigint] NULL,
[SizeOfSentMessages] [bigint] NULL,
[SizeOfReceivedMessages] [bigint] NULL,
[SizeOfInternalSentMessages] [bigint] NULL,
[SizeOfInternalReceivedMessages] [bigint] NULL,
[SizeOfInternetSentMessages] [bigint] NULL,
[SizeOfInternetReceivedMessages] [bigint] NULL,
CONSTRAINT [PK_Primary_Sum_TrafficByDay] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Day] ASC,
[Server] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_TrafficBetweenRegionsByMonth] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_TrafficBetweenRegionsByMonth](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[SourceRegion] [nvarchar](128) NOT NULL,
[DestinationRegion] [nvarchar](128) NOT NULL,
[CountOfSentMessages] [bigint] NULL,
[CountOfReceivedMessages] [bigint] NULL,
[SizeOfSentMessages] [bigint] NULL,
[SizeOfReceivedMessages] [bigint] NULL,
CONSTRAINT [PK_Sum_TrafficBetweenRegionsByMonth] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[SourceRegion] ASC,
[DestinationRegion] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_MessageByMonth] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_MessageByMonth](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[CountOf0_1MB] [bigint] NULL,
[SizeOf0_1MB] [bigint] NULL,
[CountOf1_5MB] [bigint] NULL,
[SizeOf1_5MB] [bigint] NULL,
[CountOf5_10MB] [bigint] NULL,
[SizeOf5_10MB] [bigint] NULL,
[CountOf10_15MB] [bigint] NULL,
[SizeOf10_15MB] [bigint] NULL,
[CountOf15_AboveMB] [bigint] NULL,
[SizeOf15_AboveMB] [bigint] NULL,
CONSTRAINT [PK_Primary_Sum_MessageByMonth] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Server] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_MessageByHour] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_MessageByHour](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Day] [int] NOT NULL,
[Hour] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[CountOf0_1MB] [bigint] NULL,
[SizeOf0_1MB] [bigint] NULL,
[CountOf1_5MB] [bigint] NULL,
[SizeOf1_5MB] [bigint] NULL,
[CountOf5_10MB] [bigint] NULL,
[SizeOf5_10MB] [bigint] NULL,
[CountOf10_15MB] [bigint] NULL,
[SizeOf10_15MB] [bigint] NULL,
[CountOf15_AboveMB] [bigint] NULL,
[SizeOf15_AboveMB] [bigint] NULL,
CONSTRAINT [PK_Primary_Sum_MessageByHour] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Day] ASC,
[Hour] ASC,
[Server] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_MessageByDay] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_MessageByDay](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Day] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[CountOf0_1MB] [bigint] NULL,
[SizeOf0_1MB] [bigint] NULL,
[CountOf1_5MB] [bigint] NULL,
[SizeOf1_5MB] [bigint] NULL,
[CountOf5_10MB] [bigint] NULL,
[SizeOf5_10MB] [bigint] NULL,
[CountOf10_15MB] [bigint] NULL,
[SizeOf10_15MB] [bigint] NULL,
[CountOf15_AboveMB] [bigint] NULL,
[SizeOf15_AboveMB] [bigint] NULL,
CONSTRAINT [PK_Primary_Sum_MessageByDay] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Day] ASC,
[Server] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_MailboxByMonth] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_MailboxByMonth](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[CountOfMailboxes] [bigint] NULL,
[SizeOfMailboxes] [bigint] NULL,
[SizeOfMailboxDatabases] [bigint] NULL,
CONSTRAINT [PK_Primary_Sum_MailboxByMonth] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Server] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_DeliveryTimeByMonth] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_DeliveryTimeByMonth](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[OriginationServer] [nvarchar](128) NOT NULL,
[DestinationServer] [nvarchar](128) NOT NULL,
[TotalMessages] [bigint] NULL,
[TotalDeliveryTime] [bigint] NULL,
[OneMinuteMessages] [bigint] NULL,
[FiveMinuteMessages] [bigint] NULL,
[TenMinuteMessages] [bigint] NULL,
[ThirtyMinuteMessages] [bigint] NULL,
[SixtyMinuteMessages] [bigint] NULL,
CONSTRAINT [PK_Primary_Sum_DeliveryTimeByMonth] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[OriginationServer] ASC,
[DestinationServer] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_DeliveryTimeByHour] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_DeliveryTimeByHour](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Day] [int] NOT NULL,
[Hour] [int] NOT NULL,
[OriginationServer] [nvarchar](128) NOT NULL,
[DestinationServer] [nvarchar](128) NOT NULL,
[TotalMessages] [bigint] NULL,
[TotalDeliveryTime] [bigint] NULL,
[OneMinuteMessages] [bigint] NULL,
[FiveMinuteMessages] [bigint] NULL,
[TenMinuteMessages] [bigint] NULL,
[ThirtyMinuteMessages] [bigint] NULL,
[SixtyMinuteMessages] [bigint] NULL,
CONSTRAINT [PK_Primary_Sum_DeliveryTimeByHour] PRIMARY KEY CLUSTERED
(
[Year] ASC,
[Month] ASC,
[Day] ASC,
[Hour] ASC,
[OriginationServer] ASC,
[DestinationServer] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Sum_AvailabilityByMonth] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sum_AvailabilityByMonth](
[Year] [int] NOT NULL,
[Month] [int] NOT NULL,
[Server] [nvarchar](128) NOT NULL,
[Service] [nvarchar](256) NULL,
[WindowsServiceName] [nvarchar](256) NULL,
[Up] [int] NULL,
[Down] [int] NULL,
[Maintenance] [int] NULL,
[Unknown] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Store] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Store](
[ServerName] [nvarchar](256) NULL,
[StorageGroupName] [nvarchar](256) NULL,
[Name] [nvarchar](256) NULL,
[DBType] [nvarchar](256) NULL,
[DBPath] [nvarchar](256) NULL,
[DBFileSize] [bigint] NULL,
[DBDriveSize] [bigint] NULL,
[DBDriveSpace] [bigint] NULL,
[DBVolume] [nvarchar](256) NULL,
[DBVolumeUnique] [nvarchar](256) NULL,
[DBDrive] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[StorageGroup] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StorageGroup](
[ServerName] [nvarchar](256) NULL,
[Name] [nvarchar](256) NULL,
[LogFile] [nvarchar](256) NULL,
[LogDriveSize] [bigint] NULL,
[LogDriveSpace] [bigint] NULL,
[LogVolume] [nvarchar](256) NULL,
[LogVolumeUnique] [nvarchar](256) NULL,
[LogDrive] [nvarchar](256) NULL,
[SystemFile] [nvarchar](256) NULL,
[SystemSize] [bigint] NULL,
[SystemSpace] [bigint] NULL,
[SystemVolume] [nvarchar](256) NULL,
[SystemVolumeUnique] [nvarchar](256) NULL,
[SystemDrive] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[SMTPGateway] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SMTPGateway](
[SMTPGatewayId] [int] IDENTITY(1,1) NOT NULL,
[ServerIp] [nvarchar](256) NULL,
[ServerHostName] [nvarchar](256) NULL,
CONSTRAINT [PK_SMTPGateway] PRIMARY KEY CLUSTERED
(
[SMTPGatewayId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ServerRole] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ServerRole](
[Server] [nvarchar](256) NULL,
[Role] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ServerRegion] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ServerRegion](
[Server] [nvarchar](256) NOT NULL,
[Region] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ServerPatch] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ServerPatch](
[Server] [nvarchar](256) NULL,
[PatchID] [nvarchar](256) NULL,
[Description] [nvarchar](256) NULL,
[Installed] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Server] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Server](
[Server] [nvarchar](256) NOT NULL,
[OSVersion] [nvarchar](256) NULL,
[ExchangeVersion] [nvarchar](256) NULL,
CONSTRAINT [PK_Primary_Server_Server] PRIMARY KEY CLUSTERED
(
[Server] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ResultDescription] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ResultDescription](
[Result] [bit] NULL,
[Description] [nvarchar](64) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ResourceHistory] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ResourceHistory](
[Server] [nvarchar](256) NULL,
[RollupTime] [datetime] NULL,
[Resource] [nvarchar](256) NULL,
[Used] [bigint] NULL,
[Total] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ReportExclusions] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ReportExclusions](
[entry] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[RecipientList] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RecipientList](
[RecipientListId] [bigint] IDENTITY(1,1) NOT NULL,
[Recipient] [nvarchar](256) NULL,
[Domain] [nvarchar](256) NULL,
[IsInternalEmail] [bit] NOT NULL,
CONSTRAINT [PK_Primary_RecipientList] PRIMARY KEY CLUSTERED
(
[RecipientListId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[PublicFolder] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PublicFolder](
[Server] [nvarchar](256) NULL,
[FolderPath] [nvarchar](256) NULL,
[Owner] [nvarchar](256) NULL,
[ItemCount] [bigint] NULL,
[TotalItemSize] [bigint] NULL,
[LastAccessTime] [datetime] NULL,
[LastPostCreationTime] [datetime] NULL,
[LastPostCreationUser] [nvarchar](256) NULL,
[LastPostCreationSubject] [nvarchar](256) NULL,
[LastPostModificationTime] [datetime] NULL,
[LastPostModificationUser] [nvarchar](256) NULL,
[LastPostModificationSubject] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Properties] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Properties](
[Name] [nvarchar](256) NULL,
[Value] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[OwaLogons] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OwaLogons](
[LogDate] [datetime] NOT NULL,
[Server] [nvarchar](256) NOT NULL,
[UserName] [nvarchar](256) NULL,
[LogonTime] [datetime] NOT NULL,
[ClientIPAddress] [nvarchar](64) NULL,
[Result] [bit] NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[OutlookVersion] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OutlookVersion](
[Version] [nvarchar](16) NULL,
[Description] [nvarchar](64) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[OriginationServer] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OriginationServer](
[OriginationServerId] [bigint] IDENTITY(1,1) NOT NULL,
[OriginationServer] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_OriginationServer] PRIMARY KEY CLUSTERED
(
[OriginationServerId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[MobileDeviceUser] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MobileDeviceUser](
[Server] [nvarchar](256) NULL,
[Platform] [nvarchar](256) NULL,
[DeviceType] [nvarchar](256) NULL,
[Name] [nvarchar](256) NULL,
[PIN] [nvarchar](256) NULL,
[Status] [nvarchar](256) NULL,
[EMailAddress] [nvarchar](256) NULL,
[Carrier] [nvarchar](256) NULL,
[MsgsPending] [bigint] NULL,
[DeviceModel] [nvarchar](256) NULL,
[DeviceSoftwareVersion] [nvarchar](256) NULL,
[PhoneNumber] [nvarchar](256) NULL,
[ITPolicyName] [nvarchar](256) NULL,
[GroupName] [nvarchar](256) NULL,
[GroupDescription] [nvarchar](256) NULL,
[PasswordEnabled] [bit] NULL,
[OverrideSMTPAddress] [nvarchar](256) NULL,
[MsgsForwarded] [bigint] NULL,
[MsgsSent] [bigint] NULL,
[MsgsExpired] [bigint] NULL,
[MsgsFiltered] [bigint] NULL,
[MsgsFailed] [bigint] NULL,
[RedirectWhenInCradle] [bit] NULL,
[LastContactTime] [datetime] NULL,
[DeviceFriendlyName] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[MobileDeviceTraffic] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MobileDeviceTraffic](
[Server] [nvarchar](256) NULL,
[TrafficType] [nvarchar](256) NULL,
[LogDate] [datetime] NULL,
[EMailAddress] [nvarchar](256) NULL,
[TotalBytesSent] [bigint] NULL,
[TotalBytesReceived] [bigint] NULL,
[MessagesSent] [bigint] NULL,
[MessagesReceived] [bigint] NULL,
[CalendarSent] [bigint] NULL,
[CalendarReceived] [bigint] NULL,
[ContactsSent] [bigint] NULL,
[ContactsReceived] [bigint] NULL,
[AttachmentsDownloaded] [bigint] NULL,
[AttachmentSizeDownloaded] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[MailboxTrending] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MailboxTrending](
[LogDate] [datetime] NOT NULL,
[Server] [nvarchar](256) NULL,
[DisplayName] [nvarchar](256) NULL,
[EMailAddress] [nvarchar](256) NULL,
[MailboxSize] [bigint] NULL,
[MessageCount] [bigint] NULL,
[WarningQuota] [bigint] NULL,
[ProhibitSendQuota] [bigint] NULL,
[LockedOutQuota] [bigint] NULL,
[StorageGroup] [nvarchar](256) NULL,
[Store] [nvarchar](256) NULL,
[OrganizationalUnit] [nvarchar](256) NULL,
[Department] [nvarchar](256) NULL,
[City] [nvarchar](256) NULL,
[Manager] [nvarchar](256) NULL,
[Company] [nvarchar](256) NULL,
[Office] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[MailboxPermission] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MailboxPermission](
[Server] [nvarchar](256) NULL,
[Mailbox] [nvarchar](256) NULL,
[ACEUser] [nvarchar](256) NULL,
[AccessRights] [nvarchar](256) NULL,
[IsDeny] [bit] NULL,
[IsInherited] [bit] NULL,
[IsValid] [bit] NULL,
[InheritanceType] [nvarchar](256) NULL,
[ObjectStatus] [nvarchar](64) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[MailboxContentSummary] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MailboxContentSummary](
[Server] [nvarchar](256) NULL,
[EMailAddress] [nvarchar](256) NULL,
[ReadCount] [bigint] NULL,
[Unreadcount] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[MailboxAttachmentSummary] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MailboxAttachmentSummary](
[Server] [nvarchar](256) NULL,
[EMailAddress] [nvarchar](256) NULL,
[Type] [nvarchar](256) NULL,
[Count] [bigint] NULL,
[TotalSize] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Mailbox] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Mailbox](
[EMailAddress] [nvarchar](256) NULL,
[AdministrativeGroup] [nvarchar](256) NULL,
[ServerName] [nvarchar](256) NULL,
[StorageGroupName] [nvarchar](256) NULL,
[StoreName] [nvarchar](256) NULL,
[SizeStatus] [char](32) NULL,
[Size] [bigint] NULL,
[DeletedSize] [bigint] NULL,
[SentSize] [bigint] NULL,
[StorageLimitInfo] [char](32) NULL,
[WarningLimit] [bigint] NULL,
[ProhibitSendLimit] [bigint] NULL,
[LockedOutLimit] [bigint] NULL,
[MailboxDisplayName] [nvarchar](256) NULL,
[TotalItems] [bigint] NULL,
[DeletedItems] [bigint] NULL,
[SentItems] [bigint] NULL,
[LegacyDN] [nvarchar](1024) NULL,
[OrganizationalUnit] [nvarchar](1024) NULL,
[Department] [nvarchar](1024) NULL,
[City] [nvarchar](1024) NULL,
[Manager] [nvarchar](1024) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[LogonStatistics] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[LogonStatistics](
[LogDate] [datetime] NOT NULL,
[Server] [nvarchar](256) NULL,
[UserName] [nvarchar](256) NULL,
[LogonTime] [datetime] NULL,
[LastAccessTime] [datetime] NULL,
[ClientName] [nvarchar](256) NULL,
[ClientMode] [nvarchar](50) NULL,
[ClientVersion] [nvarchar](256) NULL,
[ClientIPAddress] [nvarchar](64) NULL,
[ClientSoftware] [nvarchar](256) NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Latency] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Latency](
[TestDate] [datetime] NOT NULL,
[TestDateTime] [datetime] NOT NULL,
[Qualifier] [nvarchar](256) NULL,
[Probe] [nvarchar](256) NULL,
[URL] [nvarchar](256) NULL,
[Port] [nvarchar](256) NULL,
[Latency] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[InternalEmail] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[InternalEmail](
[email] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Primary_InternalEmail_Email] PRIMARY KEY CLUSTERED
(
[email] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[InternalDomain] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[InternalDomain](
[Domain] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Primary_InternalDomain_Domain] PRIMARY KEY CLUSTERED
(
[Domain] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[HourlyTraffic] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[HourlyTraffic](
[LogDate] [datetime] NULL,
[Server] [nvarchar](256) NULL,
[Hour] [int] NULL,
[CountSent] [bigint] NULL,
[SizeSent] [bigint] NULL,
[CountReceived] [bigint] NULL,
[SizeReceived] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ExternalEmail] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ExternalEmail](
[email] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Primary_ExternalEmail_Email] PRIMARY KEY CLUSTERED
(
[email] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ExternalDomain] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ExternalDomain](
[domain_name] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Primary_ExternalDomain_DomainName] PRIMARY KEY CLUSTERED
(
[domain_name] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[ExchangeAudit] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ExchangeAudit](
[Server] [nvarchar](256) NULL,
[LogDate] [datetime] NOT NULL,
[Id] [int] NOT NULL,
[EventKind] [nvarchar](50) NOT NULL,
[Source] [nvarchar](100) NOT NULL,
[Time] [datetime] NOT NULL,
[ActualUser] [nvarchar](100) NULL,
[AsOnBehalfUser] [nvarchar](100) NULL,
[MessageId] [nvarchar](100) NULL,
[Folder] [nvarchar](100) NULL,
[DisplayName] [nvarchar](100) NULL,
[Mailbox] [nvarchar](100) NOT NULL,
[AuthenticatedUser] [nvarchar](100) NOT NULL,
[Mailbox2] [nvarchar](100) NULL,
[AdministrativeRights] [int] NOT NULL,
[Identifier] [nvarchar](100) NULL,
[MachineName] [nvarchar](100) NULL,
[Address] [nvarchar](100) NULL,
[ProcessId] [nvarchar](100) NULL,
[ApplicationId] [nvarchar](256) NULL,
[AccessingUser] [nvarchar](256) NOT NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Eas_UserName] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Eas_UserName](
[UserNameId] [int] IDENTITY(1,1) NOT NULL,
[UserName] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Eas_UserName] PRIMARY KEY CLUSTERED
(
[UserNameId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Eas_UserAgent] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Eas_UserAgent](
[UserAgentId] [int] IDENTITY(1,1) NOT NULL,
[UserAgent] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Eas_UserAgent] PRIMARY KEY CLUSTERED
(
[UserAgentId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Eas_ServerIpAddress] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Eas_ServerIpAddress](
[ServerIpAddressId] [int] IDENTITY(1,1) NOT NULL,
[ServerIpAddress] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Eas_ServerIpAddress] PRIMARY KEY CLUSTERED
(
[ServerIpAddressId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Eas_Server] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Eas_Server](
[ServerId] [int] IDENTITY(1,1) NOT NULL,
[Server] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Eas_Server] PRIMARY KEY CLUSTERED
(
[ServerId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Eas_ClientIpAddress] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Eas_ClientIpAddress](
[ClientIpAddressId] [int] IDENTITY(1,1) NOT NULL,
[ClientIpAddress] [nvarchar](256) NOT NULL,
CONSTRAINT [PK_Eas_ClientIpAddress] PRIMARY KEY CLUSTERED
(
[ClientIpAddressId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Drive] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Drive](
[ServerName] [nvarchar](256) NULL,
[Drive] [nvarchar](256) NULL,
[Space] [bigint] NULL,
[Size] [bigint] NULL,
[Volume] [nvarchar](256) NULL,
[IsOSDrive] [bit] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[AvailabilityChecks] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AvailabilityChecks](
[LogDate] [datetime] NULL,
[Server] [nvarchar](256) NULL,
[Service] [nvarchar](256) NULL,
[WindowsServiceName] [nvarchar](256) NULL,
[TotalChecks] [int] NULL,
[UpChecks] [int] NULL,
[DownChecks] [int] NULL,
[MaintenanceChecks] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Availability] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Availability](
[LogDate] [datetime] NULL,
[Server] [nvarchar](256) NULL,
[Service] [nvarchar](256) NULL,
[WindowsServiceName] [nvarchar](256) NULL,
[Up] [int] NULL,
[Down] [int] NULL,
[Maintenance] [int] NULL,
[Unknown] [int] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[TrafficStatus] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TrafficStatus](
[LogDate] [datetime] NULL,
[TrafficType] [nvarchar](256) NULL,
[Server] [nvarchar](256) NULL,
[Detail] [bit] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[TrafficRollup] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TrafficRollup](
[LogDate] [datetime] NULL,
[Server] [nvarchar](256) NULL,
[Sender] [nvarchar](256) NULL,
[NumberOfMessagesSent] [bigint] NULL,
[TotalSizeSent] [bigint] NULL,
[NumberOfRecipients] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Traffic] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Traffic](
[TrafficId] [bigint] IDENTITY(1,1) NOT NULL,
[LogDate] [datetime] NOT NULL,
[Server] [nvarchar](256) NULL,
[Sender] [nvarchar](256) NULL,
[SenderDomain] [nvarchar](256) NULL,
[Subject] [nvarchar](1024) NULL,
[Size] [bigint] NULL,
[Sent] [bit] NULL,
[SMTPGatewayId] [int] NULL,
[OriginationTime] [datetime] NULL,
[OriginationServerId] [bigint] NULL,
[IsInternalEmail] [bit] NOT NULL,
[Year] [int] NULL,
[Month] [int] NULL,
[Day] [int] NULL,
[Hour] [int] NULL,
CONSTRAINT [PK_Primary_Traffic] PRIMARY KEY CLUSTERED
(
[TrafficId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Eas_IIS] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Eas_IIS](
[IISId] [bigint] IDENTITY(1,1) NOT NULL,
[LogDate] [int] NOT NULL,
[ServerId] [int] NULL,
[UserNameId] [int] NULL,
[UserAgentId] [int] NULL,
[HttpStatus] [int] NULL,
[BytesSent] [int] NULL,
[BytesReceived] [int] NULL,
[ServerIpAddressId] [int] NULL,
[ServerPort] [int] NULL,
[Method] [int] NULL,
[UriStem] [int] NULL,
[UrlQuery] [nvarchar](256) NULL,
[TimeTaken] [int] NULL,
[ClientIpAddressId] [int] NULL,
[Time] [datetime] NOT NULL,
CONSTRAINT [PK_Eas_IIS] PRIMARY KEY CLUSTERED
(
[IISId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[MessageList] Script Date: 07/06/2017 13:09:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[MessageList](
[MessageListId] [bigint] IDENTITY(1,1) NOT NULL,
[MessageId] [char](36) NOT NULL,
[TrafficId] [bigint] NOT NULL,
[RecipientListId] [bigint] NOT NULL,
CONSTRAINT [PK_Primary_MessageList] PRIMARY KEY CLUSTERED
(
[MessageListId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Default [DF_Eas_ClientIpAddress_ClientIpAddress] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_ClientIpAddress] ADD CONSTRAINT [DF_Eas_ClientIpAddress_ClientIpAddress] DEFAULT ('') FOR [ClientIpAddress]
GO
/****** Object: Default [DF_Eas_Server_Server] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_Server] ADD CONSTRAINT [DF_Eas_Server_Server] DEFAULT ('') FOR [Server]
GO
/****** Object: Default [DF_Eas_ServerIpAddress_ServerIpAddress] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_ServerIpAddress] ADD CONSTRAINT [DF_Eas_ServerIpAddress_ServerIpAddress] DEFAULT ('') FOR [ServerIpAddress]
GO
/****** Object: Default [DF_Eas_UserAgent_UserAgent] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_UserAgent] ADD CONSTRAINT [DF_Eas_UserAgent_UserAgent] DEFAULT ('') FOR [UserAgent]
GO
/****** Object: Default [DF_Eas_UserName_UserName] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_UserName] ADD CONSTRAINT [DF_Eas_UserName_UserName] DEFAULT ('') FOR [UserName]
GO
/****** Object: Default [DF_RecipientList_IsInternalEmail] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[RecipientList] ADD CONSTRAINT [DF_RecipientList_IsInternalEmail] DEFAULT ((0)) FOR [IsInternalEmail]
GO
/****** Object: Default [DF_Sum_Update_Updated] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Sum_UpdateHistory] ADD CONSTRAINT [DF_Sum_Update_Updated] DEFAULT ((0)) FOR [Updated]
GO
/****** Object: Default [DF_Traffic_IsInternalEmail] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Traffic] ADD CONSTRAINT [DF_Traffic_IsInternalEmail] DEFAULT ((0)) FOR [IsInternalEmail]
GO
/****** Object: ForeignKey [FK_Eas_IIS_Eas_ClientIpAddress] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_IIS] WITH CHECK ADD CONSTRAINT [FK_Eas_IIS_Eas_ClientIpAddress] FOREIGN KEY([ClientIpAddressId])
REFERENCES [dbo].[Eas_ClientIpAddress] ([ClientIpAddressId])
GO
ALTER TABLE [dbo].[Eas_IIS] CHECK CONSTRAINT [FK_Eas_IIS_Eas_ClientIpAddress]
GO
/****** Object: ForeignKey [FK_Eas_IIS_Eas_Server] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_IIS] WITH CHECK ADD CONSTRAINT [FK_Eas_IIS_Eas_Server] FOREIGN KEY([ServerId])
REFERENCES [dbo].[Eas_Server] ([ServerId])
GO
ALTER TABLE [dbo].[Eas_IIS] CHECK CONSTRAINT [FK_Eas_IIS_Eas_Server]
GO
/****** Object: ForeignKey [FK_Eas_IIS_Eas_ServerIpAddress] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_IIS] WITH CHECK ADD CONSTRAINT [FK_Eas_IIS_Eas_ServerIpAddress] FOREIGN KEY([ServerIpAddressId])
REFERENCES [dbo].[Eas_ServerIpAddress] ([ServerIpAddressId])
GO
ALTER TABLE [dbo].[Eas_IIS] CHECK CONSTRAINT [FK_Eas_IIS_Eas_ServerIpAddress]
GO
/****** Object: ForeignKey [FK_Eas_IIS_Eas_UserAgent] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_IIS] WITH CHECK ADD CONSTRAINT [FK_Eas_IIS_Eas_UserAgent] FOREIGN KEY([UserAgentId])
REFERENCES [dbo].[Eas_UserAgent] ([UserAgentId])
GO
ALTER TABLE [dbo].[Eas_IIS] CHECK CONSTRAINT [FK_Eas_IIS_Eas_UserAgent]
GO
/****** Object: ForeignKey [FK_Eas_IIS_Eas_UserName] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Eas_IIS] WITH CHECK ADD CONSTRAINT [FK_Eas_IIS_Eas_UserName] FOREIGN KEY([UserNameId])
REFERENCES [dbo].[Eas_UserName] ([UserNameId])
GO
ALTER TABLE [dbo].[Eas_IIS] CHECK CONSTRAINT [FK_Eas_IIS_Eas_UserName]
GO
/****** Object: ForeignKey [FK_MessageList_RecipientList] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[MessageList] WITH NOCHECK ADD CONSTRAINT [FK_MessageList_RecipientList] FOREIGN KEY([RecipientListId])
REFERENCES [dbo].[RecipientList] ([RecipientListId])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MessageList] CHECK CONSTRAINT [FK_MessageList_RecipientList]
GO
/****** Object: ForeignKey [FK_MessageList_Traffic] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[MessageList] WITH NOCHECK ADD CONSTRAINT [FK_MessageList_Traffic] FOREIGN KEY([TrafficId])
REFERENCES [dbo].[Traffic] ([TrafficId])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[MessageList] CHECK CONSTRAINT [FK_MessageList_Traffic]
GO
/****** Object: ForeignKey [FK_Traffic_OriginationServer] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Traffic] WITH NOCHECK ADD CONSTRAINT [FK_Traffic_OriginationServer] FOREIGN KEY([OriginationServerId])
REFERENCES [dbo].[OriginationServer] ([OriginationServerId])
GO
ALTER TABLE [dbo].[Traffic] CHECK CONSTRAINT [FK_Traffic_OriginationServer]
GO
/****** Object: ForeignKey [FK_Traffic_SMTPGateway] Script Date: 07/06/2017 13:09:51 ******/
ALTER TABLE [dbo].[Traffic] WITH NOCHECK ADD CONSTRAINT [FK_Traffic_SMTPGateway] FOREIGN KEY([SMTPGatewayId])
REFERENCES [dbo].[SMTPGateway] ([SMTPGatewayId])
GO
ALTER TABLE [dbo].[Traffic] CHECK CONSTRAINT [FK_Traffic_SMTPGateway]
GO