FatFingers
FatFingers

Reputation: 6897

Any way to change look-n-feel for query windows? Just jacked up production

After avoid disasters for a few years, my luck finally ran out.

I had a few query windows open (one of them on our production server which I forgot about). Thinking I was on our dev server, I did all sorts of nasties and totally hosed our production database.

Any BKM's on how you folks keep this from happening?

All advice appreciated!

Upvotes: 3

Views: 363

Answers (2)

gvee
gvee

Reputation: 17161

  1. Open up SQL Server Management Studio
  2. On the View menu make sure that Registered Servers is visible (alternatively hit CTRL+ALT+G
  3. In the Registered Server panel expand Database Engine
  4. Right-click Local Server Groups
  5. Chose New Server Registration
  6. Fill in your necessary server details and then switch to the Connection Properties tab
  7. Click on the Use custom color checkbox
  8. Select the colour to be used. I tend to chose bright-red for live servers and green for development environments.
  9. Save your Registered Server.

Next time you open a query on this connection the status bar at the footer should show the colour you selected.

IMPORTANT: If you change the connection of a query window (option in the right-click context menu) the colour of the status bar does not change. Just be careful out there!

Upvotes: 4

Andrei Rantsevich
Andrei Rantsevich

Reputation: 2935

Specially for such case I have added "Important DB Alert" function into my SSMS add-in called SSMSBoost. You can "save" your production and development databases and assign them different colors. Whenever you change your connection to "Important DB" you will be warned with additional tooltip, appearing in SQL Editor window. enter image description here The feature is described here: http://www.ssmsboost.com/Features/ssms-add-in-preferred-connections

Upvotes: 1

Related Questions