Well, the perfect solution is isolation of responsibility. Developers never touch production, DBAs never touch anything BUT production. Easy. 🙂
That assumes, of course, your company has sufficient financial and personnel resources to actually do something like that. As a lone wolf developer/DBA/Chief Cook and Bottle Washer my company doesn't. Like 99% of other companies out there.
So...colored tabs are the drowning IT pro's lifeline. I also like the colored background idea, I use it to identify servers for RDP, but I'm not sure how you'd do that for SSMS which is where I develop SPs.
I try to stay out of production as much as I can, and enforce the "changes migrate, damn it!" rule, but production interruptions bring down the wrath of users and down from on-high, so...sigh.
I don't know if separating instances or servers for dev/QA/production actually helps or hinders the problem of connecting to the wrong database. Anybody got input on that? I wonder if separate servers/instances for dev/QA/production actually makes the problem worse?