Lync 2013 Monitoring is great … well when it works 🙂
Today one customer wanted to open Response Group Usage Report and got nothing after 15 minutes on waiting.
The reason was a broken index in lcscdr database.
And the fix (Prefer it after full backup)
Run this query to rebuild the index:
/*
USE
[LcsCDR]
[LcsCDR]
GO
DROP
INDEX [IX_SessionDetails_CorrelationId_SessionIdTime] ON [dbo].[SessionDetails]
INDEX [IX_SessionDetails_CorrelationId_SessionIdTime] ON [dbo].[SessionDetails]
GO
*/
CREATE
NONCLUSTERED INDEX
[IX_SessionDetails_CorrelationId_SessionIdTime]
ON [dbo].[SessionDetails]
NONCLUSTERED INDEX
[IX_SessionDetails_CorrelationId_SessionIdTime]
ON [dbo].[SessionDetails]
(
[CorrelationId] ASC,
[SessionIdTime]
ASC,
ASC,
[ReplacesDialogIdTime]
ASC,
ASC,
[ReplacesDialogIdSeq] ASC,
[CallFlag] ASC,
[MediaTypes]
ASC,
ASC,
[User1ClientVerId]
ASC,
ASC,
[User2ClientVerId]
ASC,
ASC,
[SessionIdSeq]
ASC,
ASC,
[SessionStartedById]
ASC,
ASC,
[User1Id]
ASC,
ASC,
[User2Id]
ASC,
ASC,
[ReferredById]
ASC
ASC
)
INCLUDE ( [TargetUserId],
[ResponseTime],
[ResponseCode],
[SessionEndTime]) WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]
go
/*
USE
[LcsCDR]
[LcsCDR]
GO
DROP
INDEX [IX_SessionDetails_ReplacesDialogIdTime_SessionIdTime] ON
[dbo].[SessionDetails]
INDEX [IX_SessionDetails_ReplacesDialogIdTime_SessionIdTime] ON
[dbo].[SessionDetails]
GO
*/
CREATE
NONCLUSTERED INDEX
[IX_SessionDetails_ReplacesDialogIdTime_SessionIdTime]
ON [dbo].[SessionDetails]
NONCLUSTERED INDEX
[IX_SessionDetails_ReplacesDialogIdTime_SessionIdTime]
ON [dbo].[SessionDetails]
(
[ReplacesDialogIdTime]
ASC,
ASC,
[SessionIdTime]
ASC,
ASC,
[ReplacesDialogIdSeq]
ASC,
ASC,
[CallFlag]
ASC,
ASC,
[MediaTypes]
ASC,
ASC,
[User1ClientVerId]
ASC,
ASC,
[User2ClientVerId]
ASC,
ASC,
[SessionIdSeq]
ASC,
ASC,
[SessionStartedById]
ASC,
ASC,
[User1Id]
ASC,
ASC,
[User2Id]
ASC,
ASC,
[CorrelationId]
ASC,
ASC,
[ReferredById]
ASC
ASC
)
INCLUDE
( [TargetUserId],
( [TargetUserId],
[ResponseTime],
[ResponseCode],
[SessionEndTime]) WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]
go