4

I use SQL Server Mangagement Studio to examine the definition of objects in my database.

For example, to examine the definition of the table dbo.MSreplication_options in the master database, I would right-click on the table in the Object Explorer and choose 'Script Table as... > CREATE to > New Query Editor Window...'.

Lots of genericly-named query scripts. What might they contain?

As you can see from the screenshot of the current state of my Management Studio, a new tab is created for a new script called "SQLQuery9.sql", which contains the table definition.

By this time I have already examined a few other objects in this way, and have forgotten what most of the other scripts called "SQLQuery1.sql", "SQLQuery2.sql" and so on contain.

How can I configure management studio give the script a more descriptive name, perhaps containing the name of the object, like "dbo.MSreplication_options.sql", for example.

My Management Studio version is 10.0.5500.0.

1 Answer 1

5

You can't.

The SSMS tab is named after the open file, not the contents of the window/file.
So if you have not saved it, it has no name to assign

5
  • I don't understand your second statement. The table is named by a CREATE TABLE statement. Did you mean 'tab'? Is there no way to set the pattern by which Management Studio names the new files it creates? Nov 24, 2011 at 9:59
  • 1
    Nope, there's no pattern of names there. Every time is just a SQLQueryxx.sql
    – Marian
    Nov 24, 2011 at 10:47
  • @isme: yes, I meant tab
    – gbn
    Nov 24, 2011 at 11:24
  • My co-worker was sure this feature exists, or used to, but we couldn't find it anywhere in the options menu. Is there perhaps a plugin that provides the functionality? Nov 24, 2011 at 13:42
  • @isme: no plugin that that I know of.
    – gbn
    Nov 24, 2011 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.