SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Query Analyzer


Query Analyzer

Author
Message
hiemmi
hiemmi
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
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.



yellowleonard
yellowleonard
Valued Member
Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)

Group: General Forum Members
Points: 66 Visits: 30
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
David le Quesne
David le Quesne
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1623 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...
mosaic-287947
mosaic-287947
Old Hand
Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)

Group: General Forum Members
Points: 348 Visits: 841

[off-topic]

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


yellowleonard
yellowleonard
Valued Member
Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)

Group: General Forum Members
Points: 66 Visits: 30
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
bledu
bledu
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3031 Visits: 104
your best bet could be in the transaction log.
query analyser is not that forgiving


Everything you can imagine is real.

JeffB
JeffB
Right there with Babe
Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)

Group: General Forum Members
Points: 793 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.
Yorgs Neil
Yorgs Neil
SSC Journeyman
SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)

Group: General Forum Members
Points: 81 Visits: 172

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


hiemmi
hiemmi
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
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.





Arjun Sivadasan
Arjun Sivadasan
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1338 Visits: 976
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search