TFS 2005: How to do data tier only move
How to: Move Your Data Tier to another computer
Note: To complete these procedures successfully the old TFS AT & new TFS DT should have TFS 2005 SP1 applied to them. This instruction set assumes that TFS 2005 is working with version 2.0 of WSS (Windows SharePoint Service).
Required Permissions
To complete these procedures, you must be a member of the Administrators group on the old and new Data Tier and a member of the Team Foundation Administrators group.
Prepare For a Data Tier Move
Before you can move your Data Tier Server, you must back up the Team Foundation Server databases.
For more information about how to back up Team Foundation Server, see How to: Back Up a Team Foundation Server.
Add the service accounts to the new Team Foundation data-tier server
1. On the new Team Foundation data-tier server, click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.
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 your SQL Server, and then click Connect.
3. In SQL Server Management Studio, click File, click New, and then click Query with Current Connection.
A new query window opens.
4. In the new query, type the following, where domain is the name of the domain to which your service accounts belong, TFSService is the name of the Team Foundation service account, and TFSReports is the name of the SQL Server Reporting Services service account:
CREATE LOGIN [ domain / TFSService ] FROM WINDOWS;
CREATE LOGIN [ domain / TFSReports ] FROM WINDOWS;
GO
5. On the SQL Server Management Studio toolbar, click Execute. Verify that the command executed correctly, and then close SQL Server Management Studio.
6. Grant the dbcreator & securityadmin fixed server roles to the TFSService Account.
7. In Team Foundation Data Tier machine, launch SQL Server Management Studio, click File, click New, and then click Query with Current Connection. A new query window opens.
8. In the new query, type the following,
use master
exec sp_addsrvrolemember N'Domain\TFSServiceAccount', 'dbcreator'
exec sp_addsrvrolemember 'Domain\TFSServiceAccount', 'securityadmin'
GO
9. On the SQL Server Management Studio toolbar, click Execute. Verify that the command executed correctly, and then close SQL Server Management Studio.
Install Team Foundation Server on the New Hardware
After backing up your Team Foundation Server data, you must install Team Foundation Server Data Tier on the computer to which you want to move the Data Tier to. Apply kb919156 hotfix (https://www.microsoft.com/downloads/details.aspx?FamilyID=c18c756e-8f80-4987-b3bf-600068a9e3c4&displaylang=en) & TFS 2005 Service Pack1 (https://www.microsoft.com/downloads/details.aspx?FamilyId=A9AB638C-04D2-4AEE-8AE8-9F00DD454AB8&displaylang=en).
Prepare the Team Foundation Server Application Tier for the Data Tier move
1. Click Start, click Administrative Tools, click Services, select the TFSServerScheduler service, and then click Stop if the service is not already stopped.
2. Select the SharePoint Timer Service, and then click Stop.
3. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
4. In the Explorer pane, expand the Application Pools node, right-click TFS App Pool, and then click Stop.
5. In the Explorer pane, under the Application Pools node, right-click Report Server, and then click Stop.
6. Click Start, click Programs, click Microsoft SQL Server 2005, click Configuration Tools, and then click Reporting Services Configuration.
7. In Report Server Installation Instance Selection, make sure that the computer name is the name of the Team Foundation application-tier server and that the instance name is MSSQLSERVER, and then click Connect.
8. In the Explorer pane, click Server Status.
9. In the Report Server Status pane, in Instance Properties, click Stop.
Restore Team Foundation Server databases from the backups taken from the old box
You can restore the Team Foundation Server data using the restore tools provided with SQL Server 2005.
To open the Restore Database dialog box
1. On the new Team Foundation data-tier server, click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.
Note |
For more information about how to restore databases, see Implementing Restore Scenarios for SQL Server Databases. |
2. Select Database Engine for the Server type.
3. Select the appropriate Server name and Authentication scheme for the server, provide a valid User name and Password if it is required by your SQL Server, and then click Connect.
4. Expand the Databases node to show the list of databases that make up the Team Foundation Server data tier.
Complete the "To restore each database" procedure for each of 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 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, fill out 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, and then select the Overwrite the existing database box.
6. Verify that the paths specified in the Restore the database files as area match your current database paths.
This is important if you are restoring the database to a different drive.
7. Select the appropriate state from the Recovery state area.
8. Perform one of the following steps:
If you are not applying additional transaction logs, select Leave the database ready to use.
- or -
If you are applying additional transaction logs, select Leave the database non-operational.
9. Click OK to dismiss the Restore Database dialog box and restore the database.
10. 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.
Rename the Team Foundation Data-Tier Server
After restoring the Team Foundation Server databases you can use the TfsAdminUtil command-line tool to rename the data tier.
On TFS Application Tier, from the Command Prompt window, change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools and type the following command:
TfsAdminUtil RenameDT newTeamFoundationDataTierServerName
Configure Reporting Services on the Application Tier
1. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
2. In the Explorer pane, under the Application Pools node, right-click Report Server, and then click Start.
3. Click Start, click Programs, click Microsoft SQL Server 2005, click Configuration Tools, and then click Reporting Services Configuration.
4. In Report Server Installation Instance Selection, give the computer name is the name of the Team Foundation application-tier server and ensure that the instance name is MSSQLSERVER, and then click Connect.
5. In the Explorer pane, click Server Status.
6. In the Report Server Status pane, in Instance Properties, click Start.
7. In the Explorer pane, click Database Setup.
8. In the Database Connection pane, make sure that the name of the Team Foundation data-tier server is the new Data Tier Server Name, and then click Connect.
9. On the SQL Server Connection Dialog dialog box, click OK.
10. In the Database Connection pane, click Apply.
11. On the SQL Server Connection Dialog dialog box, click OK.
12. In the Explorer pane, click Windows Service Identity. On the Windows Service Identity page, in the Built-in Service Account box, Network Service should be selected, but Apply is unavailable. To grant the Team Foundation application-tier server log on permissions to the SQL Server on the Team Foundation data-tier, in the Built-in Service box, select Local Service. Do not click Apply, but instead return to the Built-in Service box and re-select Network Service. When Network Service is selected and Apply is available, click Apply. In the SQL Server Connection Dialog dialog box, and then click OK.
1. On the Team Foundation application-tier server, open Internet Explorer and in the address bar, type https:// applicationTierServerName /reports.
2. On the SQL Server Reporting Services home page, click TfsOlapReportDS.
a. Verify that the correct connection information appears in Connection String.
The string should include the name of the new Team Foundation data-tier server, and the initial catalog should be TfsWarehouse.
Data source= newDataTierServerName ;initial catalog=TfsWarehouse
b. Select Credential stored securely in the report server.
c. Enter the domain, account name, and password for the Reporting Services service.
d. Select Use as windows credentials when connecting to the data source.
3. On the SQL Server Reporting Services home page, click TfsReportDS.
a. Make sure Connection String contains the new Team Foundation data-tier server.
Data source= newDataTierServerName ; Initial Catalog=TfsWarehouse
b. Select Credential stored securely in the report server.
c. Enter domain, account name, and password for the TFSREPORTS service.
d. Select Use as windows credentials when connecting to the data source.
Build the Data Warehouse
To build the data warehouse
1. On the Team Foundation application-tier server, click Start, click All Programs, click Accessories, and then click Command Prompt.
The Command Prompt window opens.
2. Open the Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Tools folder using the command line. For example:
cd C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Tools
3. Open a Command Prompt window and build the data warehouse by typing the following command, where newDataTierServerName is the name of the new Team Foundation data-tier server, TFSReportServiceAccount is the name of the reporting services service account, and TFSServiceAccount is the name of the Team Foundation Server service account:
setupwarehouse -o -s newDataTierServerName -d TfsWarehouse -c warehouseschema.xml -ra TFSReportAccount -a TFSServiceAccount -v
Note: In case you receive an error while executing the above command that –mturl parameter is required, start the TFSApp application pool in IIS & run the above command as:
setupwarehouse -o -s newDataTierServerName -d TfsWarehouse -c warehouseschema.xml -ra TFSReportAccount -a TFSServiceAccount –mturl https://application-tiername:8080
4. On the Team Foundation data-tier server, click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.
5. Select Analysis Server 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 your SQL Server, and then click Connect.
6. Expand the Databases node to see the list of databases that make up the Team Foundation Server data tier.
7. Right-click the TFSWarehouse and then click Process.
8. In the Process Database dialog box, click OK to process the warehouse.
Configure Windows SharePoint Services 2.0 on the Application Tier
- On the Team Foundation application-tier server, click Start, click Programs, click Administrative Tools, and then click SharePoint Central Administration.
2. Select Set configuration database server, type the name of the new Team Foundation data-tier serverin the Database server field, select the Connect to existing configuration database, and then click OK.
3. Select Set default content database server, type the name of the new Team Foundation data-tier server and then click OK.
4. On the Central Administration page, click Configure virtual server settings.
5. On the Virtual Server List page, click Default Web Site.
6. On the Virtual Server Settings page, click Manage content databases.
7. On the Manage Content Databases page, click STS_Content_TFS.
8. On the Manage Content Database Settings page, select Remove content database, and then click OK.
9. On the Manage Content Databases page, click Add a content database.
10. On the Add Content Database page, in Database Information, click Specify database server settings and in Database name, type STS_Content_TFS.
11. In Database Capacity Settings, in Number of sites before a warning event is generated, type 9000, and in Maximum number of sites that can be created in this database, type 15000, then click OK.
12. (Optional) If you backed up any Windows SharePoint Services custom site definitions, custom site templates, or custom Web parts and you want to keep your customizations, restore these components now.
For more information, see the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=63543).
13. Click Start, click Administrative Tools, click Services, select the SharePoint Timer Service, then click Start.
Start the Team Foundation Services & Verify operation
1. On the Team Foundation application-tier server, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
2. In the Explorer pane, expand the Application Pools node, right-click TFS App Pool, and then click Start.
3. On the Team Foundation application-tier server, click Start, click Administrative Tools, click Services, select the TFSServerScheduler service, and then click Start,
- On the Team Foundation application-tier server, open Internet Explorer.
5. In the address bar, type the following address to connect to the ClientService Web service.
https:// applicationTierServerName :8080/WorkItemTracking/v1.0/ClientService.asmx
6. Select the StampWorkitemCache Web method and then click Invoke
Note:
It is recommended that a TFS Project be created to verify TFS is working properly. The TFSDeleteProject can be used to delete although Source Control information will remain. See https://msdn.microsoft.com/en-us/library/ms181482(VS.80).aspx for more information.
Comments
Anonymous
July 15, 2008
PingBack from http://blog.a-foton.ru/2008/07/tfs-2005-how-to-do-data-tier-only-move/Anonymous
July 21, 2008
Ed Glas on New tool for SQL Load testing Lakhminder on TFS 2005: How to do data tier move only The...