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

Query Analyzer Expand / Collapse
Author
Message
Posted Monday, February 13, 2006 9:37 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, April 20, 2013 8:50 PM
Points: 5, Visits: 14
Hi,

Does anyone know if Query Analyzer stores all the queries that are executed into a history file and if so how do i view the last executed query which i did not save it.

Thanks.



Post #258078
Posted Tuesday, February 14, 2006 5:49 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 9:51 AM
Points: 32, Visits: 20
I might be jumping the gun a bit but I'm pretty sure that you're out of luck. However, if there is such a feature do let me know because I'm forever closing QA windows without saving them.

Good luck retrieving your query.



Gareth Hopkins
SmartData UK - software, web and database developers
Post #258148
Posted Wednesday, February 15, 2006 4:32 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 4:54 AM
Points: 815, Visits: 32

I think Toad for SQL Server (60 days freeware trial version from Quest software) includes this feature.

David



If it ain't broke, don't fix it...
Post #258555
Posted Wednesday, February 15, 2006 4:50 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 1:48 PM
Points: 195, Visits: 577

[off-topic]

You can avoid losing unsaved queries by clearing the checkbox "Do not prompt for unsaved files on closure" in the QA options

Post #258561
Posted Wednesday, February 15, 2006 5:04 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: 2 days ago @ 9:51 AM
Points: 32, Visits: 20
Good old Microsoft. They always provide a tick box for any problems you're having. I'm still looking for the tick box in the .Net development environment that tells it to stop being so resource hungry.

Thanks.



Gareth Hopkins
SmartData UK - software, web and database developers
Post #258570
Posted Wednesday, February 15, 2006 11:09 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Tuesday, February 5, 2013 4:24 AM
Points: 685, Visits: 104
your best bet could be in the transaction log.
query analyser is not that forgiving



Everything you can imagine is real.

Post #258767
Posted Wednesday, February 15, 2006 1:21 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, April 25, 2014 8:34 AM
Points: 255, Visits: 74
The transaction log does not store a log of all queries.  It stores the changes that are made to a database.  It is also an unreadable entity.
Post #258823
Posted Wednesday, February 15, 2006 1:26 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, May 4, 2014 2:59 PM
Points: 19, Visits: 149

FYI

A product called Aqua Data Studio stores out a history of queries.

It works with both Oracle and MS SQL .

I have been working with their demo a little bit ; price is reasonable

 

Post #258824
Posted Thursday, February 16, 2006 4:37 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, April 20, 2013 8:50 PM
Points: 5, Visits: 14

FYI.

Instead of figuring out how to find the last unsaved executed query in SQL QA,  I started using Teradata SQL Assistant tool which can be used against most of the databases and stores all the queries in a history file.  The cool thing about this tool is that history file is displayed right in this analyzer in a tabular format and you can just select and also search on whatever previous queries you might have executed.

Thanks to all for your suggestions.




Post #259251
Posted Thursday, February 28, 2013 2:54 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, July 18, 2014 2:39 AM
Points: 406, Visits: 772
I was working on a remote machine and while I was away, the machine was restarted. Lost the scripts I had unsaved, or so I thought; and then I came up with this - was a life saver!

SELECT TOP 10
EST.text
FROM sys.dm_exec_query_stats EQS
CROSS APPLY sys.dm_exec_sql_text(eqs.handle) EST
WHERE EST.text LIKE '%text%'
ORDER BY last_execution_time DESC

Post #1424963
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse