Add:

CREATE VIEW dbo.vw_PerformanceSample_Detailed
AS

Select A.PerformanceSampleRowId, C.DeploymentId, C.RoleRowId, C.RoleName, B.PerformanceCounterRowId, B.ObjectName, B.CounterName, B.InstanceName, A.InstanceNumber, A.DateTimeUTC, A.SampleValue
From PerformanceSample A with (nolock)
Join PerformanceCounter B with (nolock)
On A.PerformanceCounterRowId = B.PerformanceCounterRowId
Join Role C with (nolock)
On A.RoleRowId = C.RoleRowId
GO

CREATE NONCLUSTERED INDEX IX_LogEvent_DateTimeUTC ON dbo.LogEvent
(
DateTimeUTC ASC
)
INCLUDE ( RoleRowId,
EventNumber,
EventLevel,
InstanceNumber,
Message) WITH (PADINDEX = OFF, STATISTICSNORECOMPUTE = OFF, SORTINTEMPDB = OFF, DROPEXISTING = OFF, ONLINE = OFF, ALLOWROWLOCKS = ON, ALLOWPAGE_LOCKS = ON)

GO


INSERT INTO EventLevel VALUES (1,'Critical')
INSERT INTO EventLevel VALUES (2,'Error')
INSERT INTO EventLevel VALUES (3,'Warning')
INSERT INTO EventLevel VALUES (4,'Information')
INSERT INTO EventLevel VALUES (5,'Verbose')

Last edited Dec 28, 2012 at 9:50 PM by ChadTillekeratne, version 3

Comments

No comments yet.