Tip for Developer’s that have a common configuration file, but want multiple database servers

Yes, I’ve been away from blogging for a bit.  I wish this one was something cool, but alas, it’s just a tip on development configurations.

So, here goes…


My development team has a common development configuration file.  This file contains a reference to a shared development database machine.  This is fine, as long as everyone is using the same machine and instance of a database.  But what if a developer wants to use a different database machine to test a change that breaks the database?

One Solution:

One thing that I came up with is to add a machine name to the HOSTS file.  In Windows, this is under C:WindowsSystem32driversetc.  Add a new entry to the file, something like DevelopmentDB.  Then, just reference that machine name in the configuration files.  Each developer can then have the DevelopmentDB machine pointing to different IPs, but still maintain a single reference in the configuration file.