One of our production servers was "cloned" to make a secondary test environment. The source server is a virtual machine (VMWare vSphere environment) joined to a domain and with a static IP address.
When the cloned VM was powered on, the virtual network adapter was enabled. The computer name was not changed. Neither was the IP address. Somehow, those two servers with the same DNS name and IP address co-existed on the same domain for several days--maybe as much as a week. We'll be busy undoing the damage for a while...
Whether it's carelessness or ignorance, people make mistakes. I can accept this. So let's assume it might happen again. I know how to fix the problem. But how do I detect it?
I am not looking for instructions or advice on how to clone a VM. I am not the one given that task. I want to know how to quickly (or immediately) detect when two computers/workstations/VM's have the same DNS name.
I decided to run a "check" at startup of the main SQL Server service that would try to determine if the SQL host had been cloned. (Note that this tactic only applies to VM's that are SQL Server hosts.)
TLDR: Hard-code the SQL host machine name and domain in a stored proc and compare those values to
DEFAULT_DOMAIN(). Do something drastic if the values don't match.
If anyone is interested, I blogged about it: SQL Server: Attack Of The Clones
I probably should have mentioned this when I originally posted the question: I am a SQL Server DBA. Even though I'm not a sysadmin-type, I do work with them. I'm not on the same "team" as the sysadmins, but I'm not walled off from them either. I appreciate all the input and numerous answers to my question. Most have indicated the problem is a training issue and I should educate those involved. I can't disagree. This is a sensible, proactive approach. But...almost everything outside of the SQL Server realm is beyond my control. Sysadmins come and go. They act and make decisions independent of my desires and needs. However, I do have control over what happens from the SQL Server perspective. I can still be proactive, even after the deed is done. Since my home-grown solution is SQL Server-specific, now it's apparent I should have posted my question on https://dba.stackexchange.com/ I think there's still some value to having the question here, but if a moderator wants to migrate it, I understand.