THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Roman Rehak

Your work may not be lost

One of the things that I found dissapointing in Management Studio 2008 is that in the event of a crash (and in addition to crashing in the first place), is that on a restart it doesn't show me a dialog with a list of auto-saved files, like my SSMS 2005 did. Yesterday as I was doing some houskeeping on my disk, I noticed a Backup folder under My Documents\SQL Server Managamnet Studio. I looked to see what's there and I saw a bunch of ~AutoRecover.~vs*.sql files, one for each query window in SSMS I was working with. This morning my SSMS crashed and when I reopened, there was no dialog for potential recovery. So I went to that folder and luckily, all the files were still there. I haven't searched Connect yet but I will, and report this as a bug. If there are any files in that folder, the user should be prompted with the option to recover.
Published Thursday, January 28, 2010 11:22 AM by roman

Comments

 

Adam Machanic said:

Thanks for sharing, Roman! I had a crash last week and lost a bunch of work. Hopefully this will save me next time.

January 28, 2010 10:52 AM
 

Barnaby Self said:

I believe this is fixed in 2008 R2. I had the recovery screen come up yesterday :)

January 28, 2010 11:04 AM
 

AaronBertrand said:

January 28, 2010 11:13 AM
 

Wiseman82 said:

This has happened to me before - too many times...  

The "Query Execution History" feature of SSMS Tools Pack is invaluable:

http://www.ssmstoolspack.com/

The add on has a lot of other useful features, but it's worth it for the execution history alone. :-)

January 28, 2010 12:29 PM
 

AaronBertrand said:

Wiseman82, I use Mladen's tool pack all the time, and finally got around to donating today in order to help support ongoing development.

However, if SSMS crashes, I think your query execution history goes away with it, doesn't it?

January 28, 2010 3:15 PM
 

Virgil Rucsandescu said:

Nope, SSMS Tools Pack saves automatically all the queries executed in SSMS in a separate folder, with sub-folders for each day, so in the eventuality of a SSMS crash, all the queries are saved in a different place.

This "Tools Pack" is invaluable indeed...

January 28, 2010 3:22 PM
 

AaronBertrand said:

Thanks Virgil, I didn't even notice that part of the feature.  I'd always used it instead of multi-level undo to go back and correct a bad cut/paste job.

January 28, 2010 3:28 PM
 

Wiseman82 said:

There are a number of configuration options available for the execution history.  You can change the save interval as required and you can also choose to store history in a SQL table if you prefer.  By default it will save the history to the file system as Virgil described.

January 28, 2010 3:43 PM
 

Alexander Kuznetsov said:

Aaron,

Maybe it is less prone to crashes if we turn of Intellisense?

I turned it off and use SQL Prompt instead. It seems like it crashes less frequently. Is it just me?

January 29, 2010 11:53 AM
 

AaronBertrand said:

Alex, I find both the built-in IntelliSense and SQLPrompt get in my way more than they help me, though in preparing for SQL Saturday I have been alternating between both.  We obviously have different usage patterns, because I can think of maybe two or three times since the Katmai beta where SSMS crashed, and none of them were recently (the last one I remember was in June, and only because I could look it up - and even that was a hang that I was able to resolve, or could likely have waited for).  So I certainly would not be able to observe any difference between native and 3rd party IntelliSense.

January 29, 2010 12:52 PM
 

AaronBertrand said:

Alex, how often does SSMS crash for you?  What is the nature of the crash, and what activity are you typically doing when it happens?

January 29, 2010 12:53 PM
 

roman said:

I only use SQL Prompt and SSMS crashes at least twice a month. Yesterday it crashed when I got to work and tried to expand a node on a server it could not connect to because I forgot to disable my wireless card. When I don't disable the wireless card, the DNS is messed up and I cannot connect to most of our servers because it routes using weird IP addresses.

January 29, 2010 3:30 PM
 

Alexander Kuznetsov said:

Adam,

I think I haven't had a single crash since before Christmas. I had a few before, but I do not log or record them in any way. Sorry I don't have more details...

January 29, 2010 3:34 PM
 

Alexander Kuznetsov said:

Roman,

That thing about wireless cards might be it - I haven't used mine in a while.

January 29, 2010 3:37 PM
 

mbourgon said:

I have it crash every few weeks, normally because it can't get a window handle. I've had that happen on two separate machines.

April 1, 2010 11:32 AM
 

jeremy j- said:

Thanks for this post. This saved me redoing a couple hours of work when I neglected to save and SSMS crashed.

August 12, 2011 4:09 PM
New Comments to this post are disabled
Privacy Statement