The last weeked was dedicated to moving our Team Foundation Server from a single server deployment to a dual server deployment. I have already gone throught the process of moving a server from one hardware configuration to another so I was quite sure that this would work.
Our previous configuration was a virtual server on an IBM blade with 2GB memory serving about 50 users. We have decided to split the deployment and add a database server which is the number one consumer of resources.
I've started the process around 21:00 and finished at 02:30. The most problematic part was that for some reason I could not uninstall SQL Server and Visual Studio from the application sevrer (the new deployment requieres uninstall of current Team Foundation Server installation and installing as an application server). I had to use the windwos installer cleanup utility to remove them from windows installer database and then I reinstalled them to their previous state. After that again unistall and installing the Team Foundation Server application tier. You can imagine it took me sometime...
Some remarks regarding the document (How to: Move from a Single-Server to a Dual-Server Deployment):
- In the section named To modify the Web.Config file to reflect the original Team Foundation data-tier server name: In 1.a there is a mistake when refering to the new data-tier server when locating the web.config file of the services. It should be the application-tier server.
- In the section named To restore and verify Report Server on the new Team Foundation Server: In 17 you are suppose to execute SetupWarehouse.exe but it won't happen since the TFSAppPull is still down. SetupWarehouse.exe uses the web service to initilize the process of rebuilding the Team System OLAP cube. You need to execute it after you are restarting the services in the section named To restart services and verify operation.
Another problem I encountered was related to the databases restore. I must say that it was my mistake since I did not follow the process and restored the databases by detaching the new ones and attaching the old ones. The issue was that the 2 databases using full text search catalog (TfsWorkItemTracking and STS_Content_TFS) were attached with the wrong reference to the full text catalog. As a result the catalog could not be rebuilt and backups failed. In addition while searching work items using the Steps to Reproduce field (which is indexed in the catalog) an error raised specifing the query failed and there is a problem on the server.
I did some search using the errors I saw in the event viewer and in database logs and understood that the catalog needs to be rebuilt. When executing the rebuild using the management studio I got no error but the process ran for about 24 hours. I'm not a DBA but this seemed strange so I stopped it and continue searching using this keywords: "Full-Text Search is not enabled for the current database", "Property FullTextIndexSize is not available for FullTextCatalog" and with the names of the catalogs: ix_STS_Content_TFS and TeamFoundationServer10FullTextCatalog. I did not find much (except for this incomplete posts). Anyway, I understood that I have to drop and recreate the catalogs. After doing this the catalogs were rebuild and everything worked.
Here are the steps I took to recreate the catalogs.
Please notice that this part is done by the Team Foundation Server installation and I did this only because the catalogs were corrupted. If you are not familiar with this stuff I suggest you consult with a Team System advisor or try to reinstall the server. Any way don't forget to backup the database. Since in this case you have problem doing it because the corrupted catalogs disturb the backup I suggest you copy the data files (mdf and logs) to another location (after you stop the system...) or find a way to disable backing up the catalogs (I read about it some where).
Open Microsoft SQL Server Management Studio and connect to the Team Foundation Server database.
For recreating the ix_STS_Content_TFS catalog do the following:
- In the object explorer expand: Databases --> STS_Content_TFS --> Storage and right click the ix_STS_Content_TFS catalog. Select Delete from the menu and press OK button in the Delete Object window. This will drop the corrupted catalog (if your catalog is corrupted you will see error when trying to open it's properties window).
- For the dbo.UserData table select all the columns except for tp_Ordering.
- For the dbo.UserInfo table select the tp_Email, tp_Login and tp_Title columns. For all of them select English in the Language for Word Breaker setting column.
- Press the OK button. The catalog should be processed for some time.
For recreating the TeamFoundationServer10FullTextCatalog catalog do the following:
- In the object explorer expand: Databases --> TfsWorkItemTracking --> Storage and right click the TeamFoundationServer10FullTextCatalog catalog. Select Delete from the menu and press OK button in the Delete Object window. This will drop the corrupted catalog.
- Right click the Full Text Catalogs item and select New Full-Text Catalog... from the menu. In the New Full-Text Catalog - TfsWorkItemTracking enter the name of the catalog: TeamFoundationServer10FullTextCatalog, select a location for the files, select Primary in the Filegroup combo box and in the Owner text box select dbo. Check the Set as default catalog check box. Press the OK button.
- Double click the newly created catalog in the Object Explorer tree. In the Full-Text Catalog Properties - TeamFoundationServer10FullTextCatalog select the Tables/Views from the left list view. Add the tables: dbo.WorkItemLongTexts to the Table/View objects assigned to the catalog. In the Eligible columns select the Words column and press the OK button. The catalog should be processed for some time and the window will be closed.
That's it. The catalogs were created and you should be able to process them.