It sometimes happened (hope all of us experienced this one) that during working with SQL Server Management Studio (SSMS) it got crashed for whatever reason. For same there is a chance that we will lose whatever queries we had open at the time of the crash. Sometimes when we re-open SSMS it will ask us to re-open any files that we recover but for some reason it doesn’t always do that and in that instance we think that our work has gone for good.
Here is a way to get some information, even if SSMS does not prompt us to recover those files they are probably still present on your machine. Go and check in your C:\Users\Virendra\Documents\SQL Server Management Studio\Backup Files\Solution1 folder.
Please share your good/bad experiences …
A more generic solution is:
“%USERPROFILE%\Documents\SQL Server Management Studio\Backup Files\Solution1”
That would work for the current user without any changes. You could also do something in PowerShell to backup the Auto Recovery files if desired. Save it to a file and you can setup a job to run every X minutes.
Get-ChildItem “$($Env:USERPROFILE)\Documents\SQL Server Management Studio\Backup Files\Solution1” | Copy-Item -Destination { $Env:TEMP + ‘\’ + (get-date -Format ‘yyyyMMdd_HHmmss’) + $_.Name } -Verbose
LikeLike
Hi Stephen Mills,
Thanks a lot for your valuable comments.
Warm Regards,
Virendra
LikeLike
nice blog. this will help more in future..
LikeLike
Cool, one line of blog bet let other save a bunch of time
LikeLike
Hi Tin Le,
Thanks a lot for your comment.
Virendra
LikeLike