Moving the Lync Server 2010 Monitoring Databases to a New SQL Server Instance

The Microsoft Lync Server 2010, Monitoring Server adds the Lync Server QoE Monitoring Service and the Lync Server Call Detail Recording service to your deployment. These services and the associated databases, QoEMetrics and LcsCdr, provide critical data about performance and compliance—data you don’t want to lose. One way to help ensure reliable monitoring is to host the QoEMetrics and LcsCdr databases on a dedicated Microsoft SQL Server data management software instance instead of collocating the SQL Server that hosts them with a server that also hosts the monitoring services, the Lync Server Archiving service, or the Front End pool databases. Although these collocation scenarios are supported in Lync Server 2010, they are not recommended because they create a single point of failure and the risk of service and data loss. You can reduce this risk by moving the QoEMetrics and LcsCdr databases from a supported collocation scenario to a dedicated SQL Server instance.

Author: Mike Adkins

Publication date: June 2011

Product version: Lync Server 2010

Introduction

Monitoring in your Microsoft Lync Server 2010 deployment is accomplished by using the Lync Server QoE Monitoring Service and the Lync Server Call Detail Recording service. The Lync Server QoE Monitoring Service monitors and records network connectivity and media information for the peer-to-peer and conferencing modalities that are supported in Lync Server 2010. The Lync Server Call Detail Recording service supports the compliance requirements that are necessitated by an organization’s regulatory policies. The data these services collect is stored in the QoEMetrics and LcsCdr databases and available for viewing in Monitoring Server Reports.

Note. For details about Monitoring Server Reports, see Monitoring Server Reports at the TechNet Library.

The reliability of the Lync Server QoE Monitoring Service and the Lync Server Call Detail Recording service depends on the server and network that hosts them. The supported Lync Server hardware load balancing and Domain Name System (DNS) load balancing features offer the reliability that is needed to host a highly available Windows Sever infrastructure for the Lync Server QoE Monitoring Service and the Lync Server Call Detail Recording service. These services rely on the use of two proprietary Microsoft SQL Server-hosted databases, QoEMetrics and LcsCdr. Microsoft SQL Server 2008 R2 failover clustering, Microsoft SQL Server 2008 failover clustering, and the Windows Server Clustering service provide a fault tolerant solution for hosting the QoEMetrics and LcsCdr databases. However, the Lync Server monitoring services (that is, the Lync Server QoE Monitoring Service and the Lync Server Call Detail Recording service) and databases (that is, the QoEMetrics and LcsCdr databases) are also supported in a non-fault tolerant fashion. The SQL Server that hosts the monitoring databases can be collocated with any of the following:

  • A server running Windows Server that hosts the Lync Server monitoring services
  • A server running Windows Server that hosts the Lync Server Archiving service
  • The SQL Server that hosts the Lync Server Front End pool databases

The supported single-server installations create a single point of failure for an organization’s audio/video (A/V) monitoring infrastructure. These scenarios can result in data loss or the loss of the monitoring services due to hardware failure that causes a database outage. You can help avoid this threat by moving the QoEMetrics and LcsCdr databases to either a SQL Server that is hosted by a Microsoft clustering solution or to a dedicated SQL Server instance on a separate server running Windows Server.

Note. For details about the supported installations for the Lync Server monitoring services, see Server Collocation in an Enterprise Edition Front End Pool Deployment at the TechNet Library.For details about Microsoft clustering, see the following topics at the TechNet Library:

Prerequisites for Moving the QoEMetrics and LcsCdr Databases

Prior to moving the QoEMetrics and LcsCdr databases, it is necessary to do the following:

  • Gather the information you’ll need.
  • Stop the Lync Server A/V Conferencing service and the monitoring services.
  • Make sure the monitoring databases are backed up.

Gathering Required Information

To move the databases, you’ll need to know the location of the server(s) that host the monitoring services and their databases. From the Lync Server Management Shell, on a server running Microsoft Lync Server 2010, Front End Server, run the following commands:

  • Get-CsService -MonitoringServer
  • Get-CsService -MonitoringDatabase

The output provides the fully qualified domain name (FQDN) of the server running Windows Server that hosts the Lync Server QoE Monitoring Service and the Lync Server Call Detail Recording service and the FQDN of the SQL Server that hosts the QoEMetrics and LcsCdr databases. Note this information for the move.

Stopping Services

To help ensure full adherence to your organization’s A/V compliance policy, the Lync Server Audio/Video Conferencing service on each of the Front End pools should be stopped while you’re moving the QoEMetrics and LcsCdr databases. This stops all A/V communications on the network to help prevent data loss.

To stop the Lync Server Audio/Video Conferencing service

  1. On the Windows Server-based server(s) running the Lync Server Audio/Video Conferencing service, click Start, and then click Run.
  2. Type services.msc, and then click OK.
  3. Locate Lync Server Audio/Video Conferencing service, right-click it, and then click Stop.

In addition, you’ll need to stop the monitoring services to avoid data loss.

To stop monitoring services

  1. On the Windows Server-based server running the Lync Server QoE Service and the Lync Server Call Detail Recording service, click Start, and then click Run.
  2. Type services.msc, and then click OK.
  3. Locate Lync Server QoE Monitoring Service, right-click it, and then click Stop.
  4. Locate Lync Server Call Detail Recording Service, right-click it, and then click Stop.

Backing Up the QoEMetrics and LcsCdr Databases

SQL Server provides point-in-time database backup and restore features. You should be able to use this proprietary feature to provide point-in-time database backups for the QoEMetrics and LcsCdr databases. Contact your SQL Server administrator to get answers to the following questions:

  • Is there a SQL Server task that manages differential backups of the QoEMetrics and LcsCdr databases?
  • Is there a SQL Server task that manages full backups of the QoEMetrics and LcsCdr databases?
  • Is there a SQL Server task that manages backups of the QoEMetrics and LcsCdr transaction logs?
  • What is the schedule for the SQL Server backup process for the QoEMetrics and LcsCdr databases?
  • Can a full backup of the QoEMetrics and LcsCdr databases be scheduled prior to moving both databases?

Note. If the SQL Server backup and restore feature is being used to back up databases that are local to its SQL Server instance, those database backups can be restored only to the same SQL Server instance they originated from.

Third-party vendors provide an array of software products that you can use to manage enterprise-level system file backup and restore processes. Research the type and the frequency of the system backup procedures that are applied to the QoEMetrics database’s qoemetrics.mdf (data) and qoemetrics.ldf (transaction) files and the LcsCdr database’s lcscdr.mdf (data) and lcscdr.ldf (transaction) files. System backups are usually scheduled to run during off-hours to help ensure the efficient use of network bandwidth. System backups can be scheduled to perform both full and differential backups as needed. Make sure a full system backup is taken of the lcscdr.mdf, lcscdr.ldf, qoemetrics.mdf, and qoemetrics.ldf files immediately before moving the QoEMetrics and LcsCdr databases to the new SQL Server instance.

Note. Microsoft Server 2008 and Microsoft Server 2003 also provide file system backup and restore services.

Note. For details about the SQL Server and Windows Server backup and restore processes, see the following:

Moving the QoEMetrics and LcsCdr Databases

To move the monitoring databases from their current location to a dedicated SQL Server instance, complete all the procedures in this section in order.

Important. Before completing the following procedures make sure you have completed all the prerequisites described in the preceding section.

To detach the databases from the server that currently hosts them

1. On the SQL Server that hosts the QoEMetrics and LcsCdr databases, open the Microsoft SQL Server Management Studio console.

2. In the tree view, expand Databases.

3. Right-click the QoEMetrics database, and then click Properties.

4. In the Select a Page pane, click Files.

5. In the Details pane, locate the file path for the database file.

Note. The monitoring database files could be located on the local hard disks of the SQL Server or at a shared location on the network. Contact the SQL Server administrator to confirm the location.

6. On the Tasks menu, click Detach, and then click OK.

7. Repeat Steps 3-6 for the LcsCdr database.

To copy the database files to the new location

1. On the SQL Server that hosts the QoEMetrics and LcsCdr databases, use Windows Explorer to locate the QoEMetrics and LcsCdr databases files. Their default names are lcscdr.mdf, qoemetrics.mdf, lcscdr.ldf, and qoemetrics.ldf. Their default installation location is either <LocalDrive:>\CsData\MonitoringStore\(default)\dbpath or <LocalDrive:>\CsData\ MonitoringStore\(default)\logpath.

Important. If the QoEMetrics and LcsCdr database files are stored on a file server that the target SQL Server can access, and if it is acceptable, leave them there. The QoEMetrics and LcsCdr database files do not need to be copied to a new location unless you intend to do so.

2. On the Windows Server-based server that hosts the QoEMetrics and LcsCdr databases files, in Windows Explorer, right-click the MonitoringStore folder, and then click Copy.

3. Right-click the destination folder, and then click Paste.

4. On the target SQL Server, open the Microsoft SQL Server Management Studio console.

5. In the tree view, expand Databases.

6. Right-click Databases, and then click Attach.

7. Click Add, and then click Browse.

8. Navigate to MonitoringStore\(default)\dbpath\lcscdr.mdf, click lcscdr.mdf, and then click OK. The Attach Database dialog box should list the full path to the lcscdr.mdf and the lcscdr.ldf files.

9. Click OK.

10. Complete Steps 8-9 for the lcscdr.ldf, qoemetrics.mdf, and qoemetrics.ldf data and log files.

To associate the FQDN of the new server to the existing archiving file store

1. On a computer running a supported version of Windows or Windows Server, click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Topology Builder.

2. Click Download the Current Topology.

3. Save a copy of the current topology to a local or shared folder.

4. In the tree view, expand Monitoring Servers.

5. Click the FQDN of the Microsoft Lync Server 2010, Monitoring Server that needs to have its SQL Server monitoring database association updated to the location of the SQL Server that now hosts the QoEMetrics and LcsCdr databases.

6. On the Actions menu, click Edit Properties.

7. In the Edit Properties dialog box, do one of the following:

  • If the SQL Server that now hosts the QoEMetrics and LcsCdr databases is displayed in SQL store, click New, add the FQDN details, and then click OK.
  • If the SQL Server that now hosts the QoEMetrics and LcsCdr databases is not displayed in SQL store, click New, add details about the new SQL Server instance, and then click OK.

Figure 1. Editing the Monitoring Server properties by using Topology Builder

To publish and verify the new deployment

1. In Topology Builder, click Lync Server 2010.

2. On the Actions menu, click Publish Topology. The Publish Topology wizard opens.

3. Make sure the FQDN of the SQL Server that now hosts the QoEMetrics and LcsCdr databases is listed and selected, and then click Next.

4. After the wizard completes, click Finish.

5. Expand Archiving Servers.

6. Click the FQDN of the Lync Server 2010, Monitoring Server. The Details pane should now show the FQDN of the SQL Server that now hosts the QoEMetrics and LcsCdr databases.

Starting services

After moving the LcsCdr and QoEMetrics databases, it is time to re-start the Lync Server QoE Monitoring Service, the Lync Server Call Detail Recording service, and the Lync Server Audio/Video Conferencing service in the order that is described in the following procedures.

To restart the monitoring services

1. On the Windows Server-based server running the Lync Server QoE Monitoring Service and the Call Detail Recording service, click Start, and then click Run.

2. Type services.msc, and then click OK.

3. Locate Lync Server QoE Monitoring Service, right-click it, and then click Start.

4. Locate Lync Server Call Detail Recording Service, right-click it, and then click Start.

5. Click Start, and then click Run again.

6. Type eventvwr.msc, and then click OK.

7. In the Windows Event Viewer, expand Applications and Service Log, and then expand Lync Server.

8. Locate the following event to make sure the Lync Server QoE Monitoring Service and the Lync Server Call Detail Recording services have successfully connected with the SQL Server that is now hosting the QoEMetrics and LcsCdr databases.

Log Name: Lync Server

Source: LS Call Detail Recording

Date: 1/18/2011 6:59:46 PM

Event ID: 26001

Task Category: (1060)

Level: Information

Keywords: Classic

User: N/A

Computer: server01.contoso.com

Description:

Lync Server Call Detail Recording (CDR) Service started.

Message Queue: .\LcsCDRQ

Database: LcsCDR

Back-end: server02. contoso.com

Log Name: Lync Server

Source: LS QoE Monitoring Service

Date: 1/18/2011 6:59:58 PM

Event ID: 19111

Task Category: (1910)

Level: Information

Keywords: Classic

User: N/A

Computer: server01.contoso.com

Description:

A connection was established with the QoE Monitoring Server database.

Server: 'server02.contoso.com' Database: 'QoEMetrics'

To start the Lync Server Audio/Video Conferencing service

1. On the Windows Server-based server(s) that are running the Lync Server Audio/Video Conferencing service, click Start, and then click Run.

2. Type services.msc, and then click OK.

3. Locate Lync Server Audio/Video Conferencing Service, right-click it, and then click Start.

Additional Considerations

Database Permissions

After the QoEMetrics and LcsCdr databases are attached to the target SQL Server instance, they should retain the default SQL Server login permissions that were assigned when they were created. The original SQL Server login permissions for the QoEMetrics and LcsCdr databases is the <domain>\RTCComponentUniversalServices security group. Figure 2 shows the properties of the SQL Server login for this security group.

Figure 2. RTCComponentUniversalServices SQL Server Login Properties dialog box

Firewall Considerations

The new target SQL Server instance will have to be accessed by using the service ports that it’s configured to use for SQL Server client requests. For details about how to configure the firewall on a server running Windows Server to allow access to the SQL Server instance’s listening ports, see the following:

Summary

Moving the Lync Server QoEMetrics and LcsCdr databases to a new SQL Server instance could be the first step in an organization’s move to a fault tolerant Lync Server monitoring service solution. Implementing a fault tolerant database solution for the Lync Server monitoring services requires careful planning and execution to help ensure that monitoring services downtime is kept to a minimum and that data loss hopefully does not occur.

Lync Server Resources

We Want to Hear from You

Keywords: QoEMetrics, LcsCdr, Lync Server monitoring, Lync monitoring, Monitoring Server, monitoring database, QoE monitoring, Call Detail Recording service