Symptom:
TF246017: Team Foundation Server could not connect to the database. Verify that the server that is hosting the database is operational, and that network problems are not blocking communication with the server.
Root Cause:
- Database In Recovery
- Database Out-of-Sync
- Permission of Service Account is not right
Solution:
DBCC CHECKDB
What if there are no errors?
Did you try TFS Admin console?
You have to check permissions in IIS manager and check the tfs site permissions if they are modified ..