Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

How to View OR Retrieve all the tabs in SQL. Expand / Collapse
Author
Message
Posted Saturday, May 3, 2014 9:10 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 1:53 PM
Points: 12, Visits: 69
SQL query windows saves all the tabs in numerical sequence after you close each window. SO for example if you are typing query in window 1 and close it and open a new query windows it labels the new windows as SQL Query2 and so on.

Does anyone know what is the purpose of saving the SQLQuery windows like this? And how to retrieve all the windows.

Post #1567267
Posted Saturday, May 3, 2014 9:27 AM This worked for the OP Answer marked as solution


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:55 PM
Points: 31,278, Visits: 15,736
There's likely no purpose, just a coding issue with SSMS that increments the number of the next window.

What does "retrieve" mean? I don't know what you are trying to do.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1567272
Posted Saturday, May 3, 2014 9:33 AM This worked for the OP Answer marked as solution
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 1:53 PM
Points: 12, Visits: 69
Thanks for answering.

Retrieve meaning I was trying to view all the SQL windows or any one of the windows. So for example if I want to bring back SQL Query3, how to do it? Since each time a query windows is closed it disappear isn't it?

I have an option to save the query window each time I close it but what if I didn't?
Post #1567274
Posted Saturday, May 3, 2014 10:13 AM This worked for the OP Answer marked as solution


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 1:42 AM
Points: 20,799, Visits: 32,717
If, while closing a tab, you do not save the sql code contained in the tab it is lost. There is no reopening a previous tab to retrieve what ever query (or queries) were in that tab.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1567278
Posted Saturday, May 3, 2014 11:27 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, November 13, 2014 9:47 AM
Points: 6,842, Visits: 13,368
Lynn, I'd like to disagree regarding "no reopening a previous tab".

There are tools out there (e.g. RedGate's SQL Prompt -> advert intented ) that'll allow you to save, search, and recover tabs in SSMS. Maybe one day MS will figure out that this is a very useful Add-On and decide to include it...




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1567280
Posted Saturday, May 3, 2014 11:38 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 1:42 AM
Points: 20,799, Visits: 32,717
LutzM (5/3/2014)
Lynn, I'd like to disagree regarding "no reopening a previous tab".

There are tools out there (e.g. RedGate's SQL Prompt -> advert intented ) that'll allow you to save, search, and recover tabs in SSMS. Maybe one day MS will figure out that this is a very useful Add-On and decide to include it...


Okay, there is no NATIVE way to recover the contents of a tab deliberately closed without saving the contents of the tab first.

That better??



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1567283
Posted Saturday, May 3, 2014 11:42 AM This worked for the OP Answer marked as solution


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, November 13, 2014 9:47 AM
Points: 6,842, Visits: 13,368
Yep.

If nothing else, at least I could promote one of RG's products




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1567284
Posted Saturday, May 3, 2014 11:54 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 3:51 AM
Points: 1,932, Visits: 19,920
Lynn Pettis (5/3/2014)
If, while closing a tab, you do not save the sql code contained in the tab it is lost. There is no reopening a previous tab to retrieve what ever query (or queries) were in that tab.


http://www.ssmsboost.com/ is another and free.
I have no commercial interests in this product


______________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
Post #1567286
Posted Monday, May 5, 2014 4:56 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 6:38 PM
Points: 13,999, Visits: 28,378
In addition to Red Gate's tool, and if you get that, really, what else do you need, Mladen Prajdic's SSMS Toolpack also has the ability to recover tabs. Plus, it has versions of queries stored so you can see changes you've made over time to a particular query window.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1567467
Posted Monday, May 5, 2014 10:18 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:55 PM
Points: 31,278, Visits: 15,736
As mentioned, there's no native way to do this. There are a number of products, including those from my employer, Red Gate, that can help.

These tabs are like files in notepad or Word. If you don't save them, they're gone. I typically save them quickly when I think I might use the code. I also sometimes drop a bunch of code in one large query1.sql file, commenting bits out, but keeping a scratchpad.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1567601
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse