ms sql: change computer name
problem: after successfully renaming a computer that is running sql server, the sql server instance still lists the old computer name. this is especially problematic for logins that are defined as OLD-COMPUTER-NAME\username.
solution:
sp_dropserver [old computer name];
GO
sp_addserver [new computer name], local;
GO
then restart the SQL service or reboot the computer
i also removed the security login with the old computer name listed and then readded it so that it was now listed as NEW-COMPUTER-NAME\username.
source:
https://msdn.microsoft.com/en-us/library/ms143799.aspx