Manually rename tabs in SSMS
Asked Answered
C

4

15

I'm always getting confused as to which tab is which in SQL Server Management Studio 2008 R2. I don't find the default naming scheme of tabs very intuitive. Is there a way I can manually rename them?

Chaddie answered 4/6, 2012 at 14:3 Comment(4)
If you save the tab as a file, then the tab takes on the file name.Alitta
I've discovered an Add-In which automatically renames widows more intuitively: SSMS Plus. But I still want to manually rename them.Chaddie
@GordonLinoff You're so right, I suppose that is all this add-in does. Go ahead and submit that as an answer and I'll accept it :PChaddie
Does this answer your question? In SSMS, how do I change a SQL query window's tab name?Hanker
B
36

If you open your options screen and set the following flags under Text Editor > Editor Tab and Status Bar > Tab Text:

Include database name: False
Include file name:     True
Include login name:    False
Include server name:   False

Then save the query as something simple you may see the results you want.

Set these options

enter image description here

Bigley answered 1/5, 2013 at 15:16 Comment(1)
Note that if you have 'Include file name' set to false, the tab will contain the path AND tmp filename. (I had everything set to false).Marine
C
2

You can manually rename tabs in SSMS with my Tabs Studio extension.

Right click on a tab and select Set SQL comment:

enter image description here

Type tab description:

enter image description here

And the comment will be added to the tab title:

enter image description here

If you want to completely replace the tab title with your custom name, in SQLComment add-in options change Transform replacement from default $_ ${SQLComment} to ${SQLComment}:

enter image description here

And the tab name will be fully replaced with your description:

enter image description here

Charismatic answered 28/10, 2020 at 12:45 Comment(1)
Too bad there isn't a free version with basic functionality.Janelljanella
A
1

then don't use tabs, switch to window view:

from the menu:
    tools - options
        in the dialog box, environment - general:
            click on the "MDI" environment radio button

I fought with the tabs and gave up, this works better for me. the tabs just show the first few characters, which ends up being the beginning of the database name, which was usless for me. You can use menu - "window" to see a list of your windows.

Ainslee answered 4/6, 2012 at 14:7 Comment(1)
I'm not seeing "MDI" anymore (must've been removed sometime before v18.4, not sure when.)Proxy
S
1

Best is to use Visual Studio - add in the SQL extensions then whatever comment you put in the first line of your SQL Query will be the name of your Tab

Visual Studio

Snug answered 8/3, 2023 at 10:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.