views:

27

answers:

3

Hi,

I have several developers which connect to production and test servers where we have DBs with similar names and structures. In SSMS there are info related to the connection, but sometimes are not properly displayed and/or hidden.

I know that it is possible to customize the status bar of each connection in SSMS, but how do you ensure that your developer is connecting to the right server before he runs a query? Is there any way to handle this?

THANKS!

A: 

Sounds like your devs require training. Failing that, replace the broken part...

Chris Lively
+2  A: 

One answer is to not have developers touching production servers, and have deploys managed by someone else. This is often a requirement depending on the sensitivity of the data you are dealing with.

RedFilter
+2  A: 

In SSMS, the connection information is displayed on a per query tab basis - all the devs have to do is mind what the tab label says. Click the "New Query" button, and read what the tab is labelled.

After that, it's a matter of knowing which instance is Dev, Test, or Prod. But you can make it more obvious by defining an alias that explicitly says "Dev", "Certification", "Production", etc via the Aliases node in SQL Server Configuration Manager. The caveat is that these are defined on a per workstation basis.

But OrbMan brings up a good point that Production access should be severely limited.

OMG Ponies
SQL Aliases work great, but if you have control of the network, you can also set up DNS aliases (CNAME records) that work just as well, and they'll cover everybody.
rwmnau