Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Move the Usage and Health Data Collection service application databases in SharePoint 2013

SharePoint 2013

Published: September 4, 2012

Summary: Learn how to move the Usage and Health Data Collection service application database.

Applies to:  SharePoint Foundation 2013 | SharePoint Server 2013 

This article describes how to move the Usage and Health Data Collection service application database. Moving service application databases to another farm database server or database instance can be done to load-balance a system. The process involves the two main tasks, each with sub-tasks, of moving the databases files and then pointing the service application to the moved database.

In this article:

Before you begin

note Note:

Administrators typically use the SharePoint Central Administration website and the SharePoint Management Shell to manage deployments. For information about accessibility for administrators, see Accessibility for SharePoint 2013.

Because SharePoint 2013 runs as websites in Internet Information Services (IIS), administrators and users depend on the accessibility features that browsers provide. SharePoint 2013 supports the accessibility features of supported browsers. For more information, see the following resources:

Important Important:

The account or accounts, performing the operations, must have the following rights and permissions:

  • A member of the Farm Administrators SharePoint group.

  • A member of the Administrators group on the local server

  • Have read permission on the source location and write permission on the target location.

  • Have the db_owner fixed database role for all of the databases that you are moving.

In some environments, you must coordinate the rename and move procedures with the database administrator. Be sure to follow any applicable policies and guidelines for managing databases.

Move the service application database

To move a service application database, you must use SQL Server and Windows Explorer. We recommend that you stop the services related to the service application before you move the related database.

The instructions in this article assume that you have installed SQL Server Management Studio on the database server. If this is not the case, you can download and install Management Studio at Microsoft SQL Server 2008 Management Studio Express (http://go.microsoft.com/fwlink/p/?LinkID=186132&clcid=0x409).

To stop the service application

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. You must stop the Usage and Health Data Collection service application by following the appropriate procedure for the service application that you are working with. For more information, see Start or stop a service (SharePoint 2013).

To detach the database from SQL Server

  1. Verify that the user account that is performing this procedure has the db_owner fixed database role for all of the databases that you are moving.

  2. In SQL Server Management Studio, open the source SQL Server instance, and then expand the Databases node.

  3. Right-click the database, point to Tasks, and then click Detach. Repeat this step for each database that you want to move.

To move database files to a new location by using Windows Explorer

  1. Verify that the user account that is performing this procedure has read permission on the source location and write permission on the target location.

  2. In Windows Explorer, locate the .mdf, .ndf, and .ldf files for the service application databases.

  3. Select the .mdf, .ndf, and .ldf files for the databases that you want to move, and then either copy or move them to the destination directory.

To attach a database to a new instance of SQL Server

  1. Verify that the user account that is performing this procedure has the db_owner fixed database role for all of the databases that you are moving.

  2. In Management Studio, open the destination SQL Server instance.

  3. Right-click the Databases node, point to Tasks, and then click Attach.

  4. In the Attach Database dialog box, browse to where you transferred the .mdf, .ndf, and .ldf files, select the .mdf file for the database that you want to attach, and then click OK.

  5. Repeat for each database that you are moving.

Pointing the Usage and Health Data Collection service application to a moved database

You can use either Central Administration or Windows PowerShell to point the Usage and Health Data Collection service application to a renamed or moved database.

To point the Usage and Health Data Collection service application to a moved database by using Central Administration

  1. Verify that the user account that is performing the procedure is a member of the Farm Administrators SharePoint group.

  2. In Central Administration, click Monitoring, and then on the Monitoring page, click Configure usage and health data collection.

    The Configure web analytics and health data collection page appears.

  3. Clear the Enable health data collection check box, and then click OK.

    You return to the Monitoring page.

  4. Click Configure usage and health data collection to return to the Configure web analytics and health data collection page.

  5. Select the Enable health data collection check box

  6. In the Logging Database Server section, specify the updated database server and database name, and then click OK.

To point the Usage and Health data collection service application to a moved database by using Windows PowerShell

  1. Verify that you have the following memberships:

    • securityadmin fixed server role on the SQL Server instance.

    • db_owner fixed database role on all databases that are to be updated.

    • Administrators group on the server on which you are running the Windows PowerShell cmdlets.

    An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 cmdlets.

    note Note:

    If you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about Windows PowerShell permissions, see Add-SPShellAdmin.

  2. Start the SharePoint 2013 Management Shell.

    • For Windows Server 2008 R2:

      1. On the Start menu, click All Programs.

      2. Click Microsoft SharePoint 2013 Products.

      3. Click SharePoint 2013 Management Shell.

    • For Windows Server 2012:

      • On the Start screen, click SharePoint 2013 Management Shell.

        If SharePoint 2013 Management Shell is not on the Start screen:

      1. Right-click Computer.

      2. Click All apps.

      3. Click SharePoint 2013 Management Shell.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following command:

    Set-SPUsageApplication -Identity "<ServiceApplicationName>" -DatabaseName "<DbName>" -DatabaseServer "<SQLServerName>"
    
    

    Where:

    • <ServiceApplicationName> is the name of the usage and health data collection service application.

    • <DbName> is the name of the database.

    • <SQLServerName> is the name of the database server.

For more information, see Set-SPUsageApplication.

note Note:

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.