TFS & Visual Studio ALM – by Neno Loje

(formerly Team System, VSTS)

Upgrade fails with TF246017: Team Foundation Server could not connect to the database.

May 24th, 2016 · No Comments · TFS Installation and Configuration, Upgrade Issues

Problem

In the middle of the TFS upgrade, it fails with the error message:

Caught exception in ExecuteScripts: Microsoft.TeamFoundation.Framework.Server.DatabaseConnectionException: TF246017: Team Foundation Server could not connect to the database. Verify that the instance is specified correctly, that the server that is hosting the database is operational, and that network problems are not blocking communication with the server. —> System.Data.SqlClient.SqlException: Cannot open database "Tfs_DefaultCollection" requested by the login. The login failed.
[12:44:29.207]   Login failed for user ‘SERVERTOGO\TFSSERVICE’.

Potential Cause

While this error message can have multiple causes (invalid credentials, SQL Server not available/not started, etc.), it was strange that it failed during the upgrade process (which means many steps were already successfully executed against that SQL Server instance).

The Windows Event Log is a good candidate where to look for the potential cause. In this case, SQL Server told me that it stopped a transaction, because the transaction log was full.

Increasing the maximum size of the Transaction Log (in SQL Management Studio) resolved the issue.

–Neno

Tags:

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment