Friday, May 30, 2014

Cannot stop Tfs 2010 Reporting Jobs

I have recently moved our TFS 2010 server to new server, when I'm trying to configure Reporting server and when I stop the reporting jobs the TFS tells me that there are running jobs please wait untill it is Idle.



I wait for a long time till the jobs finish but no way, It is always running.
After long investigations about how these jobs work, I foun that the queued jobs are saved in the Tfs_Configuration database in a table called "tbl_JobQueu". I've cleared the table "tbl_JobQueu" and it works now,

Wednesday, May 28, 2014

TFS 2010 Cannot Create Backup Plan

I have recently moved our TFS 2010 server to new server, I was trying to create a backup plan but TFS tells me that A backup plan already exists for this Tfs configuration.



The power tool has a feature to prevent multiple backup plans from being created for the same TFS databases (because they might interfere). It works by setting an extended attribute in the TFS Configuration SQL database (called TFS_BACKUP_PLAN_CONTROLLER) that identifies a configured backup plan. You can't configure another backup plan from a different machine. To do it, you will need to delete this extended attribute using SQL Server Management Studio.
You can use the following command to delete the attribute by,
 
Use Tfs_Configuration
EXEC sp_dropextendedproperty @name = 'TFS_BACKUP_PLAN_CONTROLLER'

TFS 2010 Cannot Change Account Identity

I have recently moved our TFS 2010 server to new server, when I'm trying to configure Reporting server and enter the server name and populate URLs and then press ok, the tfs tells me that user or group is not recognized.



Why this happen?


This problem happens because the TFS service Account (TfsService) was assigned to be the owner account for TFS and data tier before changing its identity. When you are moving TFS from a server to another server or another domain, you have to migrate users accounts and change thier identity to the new domain (ex. Server1\Hassan has to be changed to Server2\Hassan).


When you change the account identity after setting the ownership, TFS cannot change the service account because it becomes uneditable. So, how can we solve this problem?


Simply, we have to change the accounts identity before setting the TFS ownership. You can change the identity by running this command:

TFSConfig identities /change /fromdomain: OldComputerorDomainName /todomain:NewDomainName


This command will change the identity of all accounts provided that you have moved all the users accounts from the old server to the new server. After running this command, you have to reset the ownership by running this command:

TFSConfig Accounts /ResetOwner /SQLInstance:ServerName /DatabaseName:DatabaseName


Now, everything will work well. Happy TFS Moving.