Monday, March 20, 2006

Clone and rename servers

When you clone servers either by using imaging software on physical servers or Virtual PC, Virtual Server or VMWare images, don't be too lazy and forget about using SysPrep. Especially if other people on your network are to use the image. Else you might end up with SID/CID-issues and duplicate name-conflicts. Microsoft's own SysPrep is the best thing to use. You should not use NEWSID from SysInternals as it is limited and doesn't take care of MSDTC's CID, which is very important in BizTalk scenarios.

And if you are using SQL Server, you should run these commands after the rename:
sp_dropserver 'oldservername'
sp_addserver 'newservername','local'

Else your SQL Server Master DB will still have the old name registered, which might cause SQL commands ending up on the wrong server depending on host files and if you're running it to localhost, 127.0.0.1 and so on. It is strange that SQL Server doesn't have a self-check to warn about this in the event log at start up.