Changing of machine name affects Sql Server

If you ever need to change your machine name (either due to joining a new domain etc), you'll realise that your Sql Server instance doesn't work properly after the server reboots. The simple workaround is to run the following commands in your Query Analyzer

sp_dropserver 'old_name'
sp_addserver 'new_name', 'local', 'duplicate_ok'

If you have a SSRS instance which is also affected, simply re-run your Reporting Services configuration and

1) setup the Database connection again
2) re-create the encryption key

This works for Sql Server 2005.

Published Friday, August 22, 2008 7:12 AM by microlau
Filed under:

Comments

# re: Changing of machine name affects Sql Server

Friday, August 22, 2008 10:09 AM by cruizer

great tip alvin :)

# re: Changing of machine name affects Sql Server

Saturday, August 23, 2008 7:21 AM by microlau

Thanks :)