SQL Authentication Error: Cannot Connect to Database


This article describes a solution to the error message

'Cannot connect to database', when entering SQL Authentication credentials into TFS on startup.

Solution:


Please ensure that your SQL instance is currently running, which can be found using services (windows key + r, services.msc) or going into SQL Configuration Manager. If it has not come online automatically, manually start the service for SQL Server.


In some cases, users are unable to access TFS (after a random interval) due to an SQL authentication error. 

A potential fix for this issue is to add in the SQL Authentication Credentials into the ODBC connection, and then trying to enter them again upon startup of TFS.

Open up your Data Sources (ODBC) 32-Bit (64 Bit OS),

Then, configure the TFSMain ODBC connection:

Once you are presented with this screen, press next once (we do not need to alter any settings, unless they have changed):

When presented with this dialog, enter the username and password that has been assigned to your SQL login:

Continue to click next until you are at the end (no need to alter settings as it's already been set up).

Once you are at the end, click finish and then test the data source. You will be given a success/fail based on the information you have put as the credentials for the SQL authentication.


Once this has been configured, open TFS once more and when presented with the SQL login prompt, enter the username / password as normal.

You should now have access to TFS.

If users still continue to have issues with their SQL authentication, check the setup of the user that has been provided for the SQL Auth credentials.




Contact Us

If you are still having issues in relation to this, or any other TFS related issue Contact Us.