Friday, 23 March 2012

Unlock databases and stop tfs services


CMD TO C:\Program Files\Microsoft Team FoundationServer 2010\Tools on server and run commands below

TFSServiceControlquiesce <<<<<<<<<<<<<< UNLOCK DATABASES, STOPS TFS SERVICES

TFSConfig RemapDBs/DatabaseName:basv-bds-001;TFS_Configuration /SQLInstances:basv-bds-001/Continue

TFSConfig Accounts/ResetOwner /SQLInstance:basv-bds-001 /DatabaseName:Tfs_Configuration

TfsConfig Accounts/add /AccountType:ApplicationTier /account:KCTC\TFSService/SQLInstance:basv-bds-001 /DatabaseName:Tfs_Configuration

TFSConfig RemapDBs/DatabaseName:basv-bds-001;TFS_Configuration /SQLInstances:basv-bds-001/Continue

TFSConfig registerDB/sqlInstance:basv-bds-001 /databaseName:Tfs_Configuration