Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
1  
+1 Brilliant, mate. –  Russell McClure Nov 23 '11 at 18:58
    
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? –  Iain Elder Nov 24 '11 at 9:59
1  
Nope, there's no pattern of names there. Every time is just a SQLQueryxx.sql –  Marian Nov 24 '11 at 10:47
    
@isme: yes, I meant tab –  gbn Nov 24 '11 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? –  Iain Elder Nov 24 '11 at 13:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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