How to: Rename a Data-Tier Server
You can rename your Team Foundation data-tier server. To do this, you must rename the computer itself and perform several other steps to reconfigure Team Foundation Server, Reporting Services, and Windows SharePoint Services.
Note |
|---|
| If you have configured Team Foundation Server Proxy for a single-server Team Foundation Server deployment, you must modify the proxy.config file by using the new name of the Team Foundation application-tier server as part of renaming your Team Foundation data-tier server. For more information, see Team Foundation Server Proxy and Source Control. |
Note |
|---|
| This procedure works for both single-server Team Foundation Server configurations and for renaming the Team Foundation data-tier server in a dual-server Team Foundation Server deployment. |
Required Permissions
To perform this procedure, you must be a member of the Administrators group on the Team Foundation data-tier server. For more information about permissions, see Team Foundation Server Permissions.
To stop the services used by Team Foundation Server
-
On the Team Foundation application-tier server, click Start, click All Programs, click Microsoft SQL Server 2005, click Configuration Tools, and then click Reporting Services Configuration.
The Reporting Services Configuration Manager window opens, and the Report Server Installation Instance Selection dialog box opens.
-
Make sure that the information in Machine Name and Instance Name are correct and then click Connect to connect to the server. Close the Report Server Installation Instance dialog box.
-
Select Server Status and then click Stop.
-
Click Exit to close the Reporting Services Configuration window.
-
On the Team Foundation application-tier server, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
The Internet Information Services (IIS) Manager window opens.
-
Expand the Team Foundation application-tier computer node, and then expand the Web Sites node.
-
Select the Default Web Site, and then click Stop.
-
Expand the Team Foundation application-tier computer node, and then expand the Application Pools node.
-
Select the ReportServer application pool, and then click Stop.
-
Select the TFS AppPool application pool, and then click Stop.
-
Click Exit to close the Internet Information Services (IIS) Manager window.
-
On the File menu, click Exit to close the Internet Information Services (IIS) Manager window.
-
On the Team Foundation application-tier server, click Start, click Administrative Tools, and then click Services.
The Services window opens.
-
Select the SharePoint Timer Service service, and then click Stop.
-
Select the TfsServerScheduler service, and then click Stop.
-
On the File menu, click Exit to close the Services Manager window.
To rename the computer
-
On the Team Foundation data-tier server, click Start, right-click My Computer, and then click Properties.
The System Properties window opens.
-
In the Computer Name tab, click Change.
The Computer Name Changes window opens.
-
In the Computer Name box, type the new computer name, and then click OK.
-
Click Exit to close the System Properties window.
To update Team Foundation Server to use the new data-tier server name
-
On the Team Foundation application-tier server, click Start, click All Programs, click Accessories, and then click Command Prompt.
The Command Prompt window opens.
-
Open a Command Prompt window and change directories to the drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools directory.
-
At the command prompt, run the TFSAdminUtil tool with the RenameDT option to connect to the data tier, as shown in the following example:
TFSAdminUtil RenameDT newservername
-
Close the Command Prompt window.
To update Team Foundation Server to use the new application-tier server name, if it is configured as a single server
-
On the Team Foundation application-tier server, click Start, click All Programs, click Accessories, and then click Command Prompt.
The Command Prompt window opens.
-
Open a Command Prompt window and change directories to the drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Web Services directory.
-
Open the web.config file in any plain-text editor, such as Notepad.
-
Replace the old Team Foundation data-tier server name with the new Team Foundation data-tier server name in the add key elements that define TfsNameURL and TFS Name, as shown in the following example.
<!-- TFS name and Url information --> <add key="TFSNameUrl" value="http://newDataTierServerName:8080" /> <add key="TFS Name" value="newDataTierServerName "/>
-
On the File menu, click Save.
-
On the File menu, click Exit to close the plain-text editor.
-
Open a Command Prompt window and change directories to the drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\TfsServerScheduler directory.
-
Open the TfsServerScheduler.exe.config in any plain-text editor, such as Notepad.
-
Replace the old Team Foundation data-tier server name with the new Team Foundation data-tier server name in the add key element that defines TfsNameUrl. For example:
<add key="TfsDomainUrl" value="http://newDataTierServerName:8080" />
Note The key name may be BisDomainURL instead of TfsNameURL. If so, change the key name to TfsNameURL.
-
On the File menu, click Save.
-
On the File menu, click Exit to close the plain-text editor.
-
Open a Command Prompt window and change directories to the drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\CoverAn directory.
-
Open the CoverAn.exe.config in any plain-text editor, such as Notepad.
-
Replace the old Team Foundation data-tier server name with the new Team Foundation data-tier server name in the add key element that defines TfsNameUrl. For example:
<add key="TfsNameUrl" value="http://newDataTierServerName:8080" />
-
On the File menu, click Save.
-
On the File menu, click Exit to close the plain-text editor.
-
Open a Command Prompt window and change directories to the drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools directory.
-
At the command line, run the TFSAdminUtil tool with the ActivateAT option to activate the Team Foundation application-tier server. For example:
TFSAdminUtil ActivateAT
Note There will be a warning that indicates that the Team Foundation data-tier server is bound to the old Team Foundation application-tier server name. When you are prompted whether to continue, press Y to continue.
-
Close the Command Prompt window.
In a single-server configuration, client users must connect to the newly renamed Team Foundation application-tier server if they were previously using the Team Foundation application-tier server under its old name. If client users were connected to the Team Foundation application-tier server when the renaming procedure was performed, they may have to update their Team Foundation Server caches and run the devenv /resetuserdata command, or wait two hours before reconnecting.
To start and configure Reporting Services
-
On the Team Foundation application-tier server, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
The Reporting Services Configuration Manager window opens, and the Report Server Installation Instance Selection dialog box opens.
-
Make sure that the information in Machine Name and Instance Name are correct, and then click Connect to connect to the server. Close the Report Server Installation Instance dialog box.
-
Expand the Team Foundation application-tier computer node, and then expand the Application Pools node.
-
Select the ReportServer application pool, and then click Start.
-
Expand the Web Sites node, select Default Web Site, and then click Start.
-
On the File menu, click Exit to close the Internet Information Services (IIS) Manager window.
-
Click Start, click All Programs, click Microsoft SQL Server 2005, click Configuration Tools, and then click Reporting Services Configuration.
The Reporting Services Configuration Manager window opens.
-
Select Database Setup, in the Server name, enter the new data-tier server name, and then click Apply.
-
Select Server Status and then click Start.
-
If Team Foundation Server is configured as a single server, select Windows Service Identity, change the Built-in Account selection to Local System, set the Built-in Account back to Local Service, and then click Apply.
-
Click Exit to close the Reporting Services Configuration window.
-
Open a browser and browse to http://applicationTierServerName/reports in the address bar.
-
On the SQL Server Reporting Services home page, click TfsOlapReportDS.
-
Change the Connection String to use the new Team Foundation data-tier server name, as shown in the following example.
Data source= DataTierServerName ;initial catalog=TfsWarehouse
-
Select Credential stored securely in the report server.
-
Enter the account name (including domain if applicable) and password for services account specified for the Reporting Services service account (referred to as TFSReports).
Note If you do not know which service account you need, use SQL Server Management Studio to check which account belongs to the TfsWarehouseDataReader role in the TfsWarehouse database.
-
Select Use as windows credentials when connecting to the data source, and then click Apply.
-
Click Home in the upper-left corner to return to the SQL Server Reporting Services home page.
-
-
On the SQL Server Reporting Services home page, click TfsReportDS.
-
Change the Connection String to use the new Team Foundation data-tier server name, as shown in the following example.
Data source= DataTierServerName;initial catalog=TfsWarehouse
-
Select Credential stored securely in the report server.
-
Enter the account name (including domain if applicable) and password for the Reporting Services service account (referred to as TFSReports).
-
Select Use as windows credentials when connecting to the data source, and then click Apply.
-
-
On the File menu, click Close to close the browser.
To rebuild the data warehouse OLAP cube
-
On the Team Foundation application-tier server, click Start, click All Programs, click Accessories, and then click Command Prompt.
The Command Prompt window opens.
-
Open a Command Prompt window and change directories to the drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools directory.
-
Rebuild the warehouse Analysis Services database by typing the following command:
setupwarehouse -o -s DataTierServerName -d TfsWarehouse -c warehouseschema.xml -ra TFSReportAccount -a TFSServiceAccount
-
Close the Command Prompt window.
-
On the Team Foundation data-tier server, click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.
-
Select Analysis Server for the Server type, select the data-tier server name, and then click Connect.
-
Expand the Databases node to see the list of Analysis Services databases installed on the Team Foundation data-tier server.
-
Right-click the TFSWarehouse database and then click Process.
-
In the Process Database dialog box, click OK to process the warehouse.
-
Click Close to close the Process Progress dialog box.
-
On the File menu, click Exit to close SQL Server Management Studio.
To configure and start Windows SharePoint Services
-
On the Team Foundation application-tier server, click Start, click Administrative Tools, and then click SharePoint Central Administration.
The SharePoint Central Administration window opens.
-
In the Server Configuration section, select Set configuration database server, type the new Team Foundation data-tier server name in the Database server field, select the Connect to existing configuration database, and then click OK.
-
In the Server Configuration section, select Set default content database server, type the new Team Foundation data-tier server name, and then click OK.
-
On the File menu, click Close to close the SharePoint Central Administration window.
-
Click Start, click Administrative Tools, and then click Services.
The Services window opens.
-
Select SharePoint Timer Service, and then click Start.
-
On the File menu, click Exit to close the Services window.
If the old Team Foundation data-tier server name is still recognized in Active Directory, Windows SharePoint Services might not accept the new server name. If that occurs, wait for the old server name to be purged, and then repeat this procedure.
To start the remaining services used by Team Foundation Server
-
On the Team Foundation application-tier server, click Start, click Administrative Tools, and then click Services.
The Services window opens.
-
Click the TfsServerScheduler service, and then click Start.
-
On the File menu, click Exit to close the Services window.
-
On the Team Foundation application-tier server, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
The Internet Information Services (IIS) Manager window opens.
-
Expand the Team Foundation application-tier server node, and then expand the Application Pools node.
-
Select the TFS AppPool application pool, and then click Start.
-
On the File menu, click Exit to close the Internet Information Services (IIS) Manager window.
See Also
I also had to re-import the Reporting Services encryption keys after restarting that service - fortunately I had a backup. Be sure to back them up before starting this procedure, if you haven't already.
With that done, Sharepoint still didn't work for me; the event log said it was still trying to connect to the old machine. Even though the above steps have you change the default content and config databases, the Default Web Site was still looking for its database on the old machine. I went into its config through Sharepoint Central Administration, deleted its content database, and then added a new one. I had to give it the name of the existing db (STS_Content_TFS for me), because the default creates a new db instead of connecting to the old one.
Now it finally works. I wouldn't call it a breeze, but if they fix the 4 or 5 errors in the doc, it could pass for a minor gale.
Whoops, spoke too soon. Sharepoint was still trying to grab reports from the old server. Looking at Buck Hodges' blog, http://blogs.msdn.com/buckh/archive/2007/03/31/configuring-team-foundation-server-to-use-fully-qualified-domain-names.aspx, I found the registry key to change that got that bit working.
When following the instructions, I came across two things where I had to do different things than stated in this documentation:
Section "to start and configure reporting services"
Step 1 states that you have to select the reporting server instance. This is wrong, because you will be in IIS Manager console, which has no means to select a reporting server.
The second sentence of Step 1 and Step2 are erroneous.
Section "To Rebuild the data warehouse OLAP cube"
Step 3 lists the parameters for rebuilding the data warehouse. When entering exact the given parameter list, you wull get an error "-mturl parameter is missing"; you have to add -mturl http://servername:8080.
This leads to another change: you will have to start the Tfs AppPool application pool before rebuilding the data warehouse, else the connection will not be possible. The instructions for that are given later in the document (Steps 4-7 of "To start the remaining services...").
With my process, I was not able to rebuild the warehouse because of an error telling me that some colum information could not be retrieved. Maybe this was due to missing credential information, but for me the alternative worked:
before renaming the server (name it Step 0 of the whole procedure):
- Open Sql Server Management Studio
- select the TFS data tier server
- connect to analysis services
- select the TfsWarehouse Database
- in the context menu, select "Script Database"->" as Create to"->"New Query window"
- find all occurrences of the old server name and replace them with the new server name
- save the script with an arbitrary filename
After renaming the server, just before the step "To rebuild the data warehouse olap cube"
- Stop the Sql Server Analysis Services Windows Service
- delete the directory and the .xml file that start with "Tfswarehouse" in the "C.\Program Files\Microsoft SQl Server\MSSQL.2\OLAP\Data" directory
- Start the Sql Server Analysis Services Windows Service
- Open Sql Server Management Studio
- select the (renamed) TFS data tier server
- connect to analysis services
- select the Databases folder
- open the previously saved script
- execute the script
For me, that did the work.
The rest of the documentation was totally correct, and the whole process (excluding the warehouse rebuild step) worked as a breeze.
- 6/6/2007
- Guenter