Having set-up a TFS server, I subsequently decided to rename the server (it is on a VM so it's been renamed for network purposes). When I now go into TFS Management Console on the server, I'm getting:

SQL Access Denied

For Server URL, Noritifcation URL and various other settings. Obviously this is caused by them still looking for the SQL Server instance at the old server name. My question is: can I change this, or does it require a re-install of TFS Server?

I'm running TFS Server 2013 on Windows Server 2008-R2.

Below is a screenshot; the areas in blue are showing the old server name still.

enter image description here


Following @DanBig's suggestion and link below, the access denied message is now resolved (the key was editing the web.config file in the TFS directory). However, The application tier is now pointing at the old server name (this time highlighted in yellow below):

enter image description here


Login to SQL server through Management Studio and run this:

select @@servername

The output will likely reflect the old hostname of the server. If so, run this script, and restart the service.

exec sp_dropserver '<oldhostname>\instance'
exec sp_addserver '<newhostname>\instance' , local

Once the service is restarted, open a new query and run the first script again, it should now reflect the new hostname.

To change the data and applcation tier settings, you need to edit web.config for each.

App tier: C:\Program Files\Microsoft\"tfs dir"\Application Tier\Web Services\web.config

<add key="applicationDatabase" value="Data Source=**computer_name**;Initial Catalog=Tfs_Configuration;Integrated Security=True;" />
  • Whilst that certainly did work in changing the servername for SQL, TFS is still listing the data tier as the old server name, and it still gives an error saying that it can't access the DB. – Paul Michaels Feb 5 '14 at 8:59
  • Take a look at this link. msdn.microsoft.com/en-us/library/ee248587(v=vs.100).aspx – DanBig Feb 5 '14 at 13:15
  • Many thanks for this. I think it got me 80% of the way there; I've edited my post with what happened after following that document. – Paul Michaels Feb 5 '14 at 16:06
  • I'm not particularly sure why, but restarting the server a few times seems to have corrected this – Paul Michaels Feb 12 '14 at 12:06
  • Nice answer. Truly helped me. I wish I could plus many times. – Saeed Neamati Mar 30 '15 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.