Export (0) Print
Expand All
2 out of 4 rated this helpful - Rate this topic

How to: Configure SQL Server Mirroring for the Team Foundation Data-Tier Server

You can configure a second Team Foundation data-tier server to act as a SQL mirror of your principal Team Foundation data-tier server. Database mirroring will keep copies of all Team Foundation databases on the principal Team Foundation data-tier server synchronized with the databases on the mirroring Team Foundation data-tier server. If your principal Team Foundation data-tier server becomes unavailable, you can manually swap the roles of the principal and mirroring Team Foundation data-tier servers so that the mirroring Team Foundation data-tier server becomes the principal Team Foundation data-tier server.

For more information about Team Foundation Server and SQL Server Mirroring, see Mirroring the Team Foundation Data-Tier Server.

NoteNote

Automatic failover of SQL mirror servers is not supported for Team Foundation Server.

Required Permissions

To perform these procedures, you must be a member of the Administrators group and a member of the SQL Server Administrator group on the principal and mirroring Team Foundation data-tier servers. For more information, see Team Foundation Server Permissions.

To prepare the principal Team Foundation data-tier server for a SQL mirror

  1. On the principal Team Foundation data-tier server, make a full backup of all the Team Foundation Server databases and the Team Foundation Server transaction log. For more information about how to back up Team Foundation Server, see How to: Back Up a Team Foundation Server.

  2. Back up the Reporting Services encryption key. Make sure that you store the encryption key in a secure location on a different computer from the Team Foundation Server and that the key can be accessed if it is needed. For more information about how to back up the encryption key, see How to: Back Up the Reporting Services Encryption Key.

Install Microsoft SQL 2005 to Act as the SQL Mirror

After you back up the databases on the Team Foundation data-tier, you must install a second Team Foundation data-tier server to act as the SQL mirror.

To install and prepare a SQL Mirror

  • Install Microsoft SQL Server 2005 on a server to act as the SQL mirror. Make sure that Microsoft SQL Server 2005 is installed correctly and operational. For detailed instructions, see the topics "How to Install Microsoft SQL Server 2005 for Team Foundation Server (Dual-Server)" and "How to Verify Microsoft SQL Server 2005 Installation" in the Team Foundation Server Installation Guide, available from the Microsoft Web site (http://go.microsoft.com/fwlink/?linkid=40042).

    NoteImportant

    Be sure to install Microsoft SQL Server 2005 Service Pack 1 as part of the installation.

Restore Data on the SQL Mirror Server

You must restore the Team Foundation Server data onto the Team Foundation data-tier server that will serve as the SQL mirror using the restore tools that are provided with SQL Server 2005.

Caution noteCaution

You must restore all databases to backups taken at the same point in time or the databases become corrupted.

To open SQL Server Management Studio and view databases

  1. On the Team Foundation data-tier server that will act as the SQL mirror, click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.

    NoteNote

    For more information about how to restore databases, see Implementing Restore Scenarios for SQL Server Databases.

  2. Select Database Engine for the Server type. Select the appropriate Server name and Authentication scheme for the server. Provide a valid User name and Password if it is required by SQL Server, and then click Connect.

  3. Expand the Databases node to show the list of databases that make up the Team Foundation data tier. The list will be empty of Team Foundation databases until you follow the "To restore each database" procedure for Team Foundation databases.

Complete the "To restore each database" procedure for the following databases:

  • ReportServer

  • ReportServerTempDB

  • STS_Config_TFS

  • STS_Content_TFS

  • TfsBuild

  • TfsIntegration

  • TfsVersionControl

  • TfsWarehouse

  • TfsWorkItemTracking

  • TfsWorkItemTrackingAttachments

  • TfsActivityLogging

To restore each database

  1. Right-click the database that you want to restore, point to Tasks, point to Restore, and then click Database.

  2. In the Restore Database dialog box, select From Device in the Source for restore area, and then click the ellipsis button ().

  3. In the Specify Backup dialog box, complete the information to specify the location of the backup file, and then click OK.

    The first backup you apply must be a full backup, followed by the transaction log backups, in the order they were created.

  4. In the Select the backup sets to restore area, select the backup sets to restore.

  5. From the left navigation pane, select Options. In the Restore Options area, select the Overwrite the existing database box.

  6. In the Restore the database files as area, verify that the paths that are specified match your current database paths.

  7. In the Recovery State area, click Leave the database non-operational, and do not roll back uncommitted transactions. Additional transaction logs can be restored. (RESTORE WITH NORECOVERY).

  8. Click OK to dismiss the Restore Database dialog box and restore the database.

  9. If you are applying additional transaction logs, follow this procedure for each log backup in the order they were created starting from the one made after the full backup. For more information, see Applying Transaction Log Backups.

Configure the Team Foundation Data-Tier Server to Use the SQL Mirror

As soon as you have restored the Team Foundation databases to the Team Foundation data-tier server that will serve as the SQL mirror, you must configure the original Team Foundation data-tier server to use the other server as a mirror.

NoteImportant

You must allow for TCP traffic on the appropriate database mirroring port between the Team Foundation data-tier server and the server you want to use as a mirror. The default port for this is 5022. You can configure SQL Server to use another port for mirroring.

To configure SQL Server mirroring from the principal Team Foundation data-tier server to the mirroring server

  1. On the principal Team Foundation data-tier server, click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.

  2. In Connect to Server, select Database Engine for the Server type. Select the principal data-tier server in Server name and the appropriate authentication scheme in Authentication. Provide a valid User name and Password if it is required by SQL Server, and then click Connect.

  3. Expand the Databases node to display the list of databases that make up the Team Foundation data tier. You must perform the following steps for the following databases in the order in which they appear here:

    • ReportServer

    • ReportServerTempDB

    • STS_Config_TFS

    • STS_Content_TFS

    • TfsBuild

    • TfsIntegration

    • TfsVersionControl

    • TfsWarehouse

    • TfsWorkItemTracking

    • TfsWorkItemTrackingAttachments

    • TfsActivityLogging

  4. Right-click the first database that you want to mirror and then click Properties.

  5. In Database Properties, in the Select a page window, click Mirroring. On the Mirroring page, click Configure Security.

    The Configure Database Mirroring Security Wizard opens. Click Next.

  6. On the Include Witness Server page, click No, and then click Next.

  7. On the Choose Servers to Configure page, click Next.

  8. On the Principal Server Instance page, review the default information to make sure that it matches the information for the original Team Foundation data-tier server, and then click Next.

  9. On the Mirror Server Instance page, in Mirror Server Instance, type the name of the Team Foundation data-tier server you set up to act as the SQL mirror, and then click Connect.

  10. In Connect to Server, select the appropriate Server name and Authentication scheme for the server. Provide a valid User name and Password if it is required by SQL Server, and then click Connect.

  11. On the Service Accounts page, in Principal, type the name of the Team Foundation service account (referred to as TFSService). In Mirror, type the name of the Team Foundation service account. These should be the same account. Click Next.

  12. On the Complete the Wizard page, review the information, and if all information is correct, click Finish.

  13. When the wizard has finished setting up the mirroring endpoints, click Close.

    The Database Properties dialog box opens. Click Start Mirroring.

  14. Repeat steps 4-13 for every Team Foundation database. At the end of the process, all Team Foundation databases should be mirrored from the principal Team Foundation data-tier server to the mirrored Team Foundation data-tier server.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.