title: How to determine at runtime if I am connected to production database?
body: <p>OK, so I did the dumb thing and released production code (C#, VS2010) that targeted our development database (SQL Server 2008 R2).  Luckily we are not using the production database yet so I didn't have the pain of trying to recover and synchronize everything...</p>
  
  <p>But, I want to prevent this from happening again when it could be much more painful.  My idea is to add a table I can query at startup and determine what database I am connected to by the value returned.  Production would return "PROD" and dev and test would return other values, for example.</p>
  
  <p>If it makes any difference, the application talks to a WCF service to access the database so I have endpoints in the config file, not actual connection strings.</p>
  
  <p>Does this make sense?  How have others addressed this problem?</p>
  
  <p>Thanks,
  Dave</p>