Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Color coding SQL Server 2008 databases

I often have multiple databases open in SQL Server 2008. Often they are prod, dev, and dr. It is annoying because each window says something generic like SQLQuery1.sql... (sa(200))*. So I have to hover over the tab and make sure I am in the correct window.

Is there a way to color code each window, or in some way to make it instantly knowable which database or server I am in?

Jonathan

like image 375
JonathanWolfson Avatar asked Jun 05 '09 13:06

JonathanWolfson


People also ask

How do I change Colors in SQL Server?

Click Options on the Tools menu. Click Environment, and then click Fonts and Colors. In the Show settings for list, select Text Editor. Change the font, size, display item, foreground and background colors.

Is SQL Server 2008 EOL?

SQL Server 2008 and SQL Server 2008 R2 reached their end of support on July 9, 2019, while Windows Server 2008 and Windows Server 2008 R2 reached their deadline together with Windows 7 on January 14, 2020.

How do you give a color in SQL?

Editing environments and colors To change the color of an environment: In the SQL Prompt options, under Tabs > Color, click Edit environments. Click the color you want to change and choose a new color: Press Enter.


2 Answers

Yes, you can color-code connections in SQL 2008, by modified the properties of the registered server. There is a "Use Custom Color" option on the Connection Properties tab.

See this cool tutorial video by the Midnight DBA

like image 99
BradC Avatar answered Dec 10 '22 04:12

BradC


I'm not sure about changing the colors, but I got tired of the small tab truncating the window name. As a result I run them as windows, so the entire DB name shows in the window's frame.

I have 2005 (shouldn't be that different than 2008) and this is where I made the change:

tools - options:
    environment
        general
            MDI Environment
like image 40
KM. Avatar answered Dec 10 '22 06:12

KM.